Skip to main content

Open

Opens or creates a BadgerDB database instance for use in your automation workflow.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Database Folder - Path to the folder where the database files will be stored. Required when Storage is set to "Disk". The folder will be created if it doesn't exist.

Options

  • Storage - Storage type for the database:
    • In Memory - Creates a temporary database in memory. Data is lost when the flow stops. Ideal for session data or temporary caching.
    • Disk - Creates a persistent database on disk. Data survives between automation runs. Requires a valid Database Folder path.

Output

  • Database Id - A unique identifier for the opened database. This ID must be passed to all other BadgerDB nodes to perform operations on this database instance.

How It Works

The Open node is the first step in working with BadgerDB. It initializes a database connection and returns a database ID that is used by all other BadgerDB operations.

When executed, the node:

  1. Validates the storage type and database folder (if using disk storage)
  2. Creates or opens the database with the specified configuration
  3. Returns a unique database ID for subsequent operations
  4. Stores the database instance in memory for the duration of the flow

Examples

Example 1: Open Persistent Database

Store customer data that persists between automation runs:

Inputs:
Database Folder: C:\RPA\databases\customers
Options:
Storage: Disk
Output:
Database Id: db_id (saved to message)

Example 2: Open In-Memory Database

Create a temporary cache for the current session:

Inputs:
Database Folder: (empty)
Options:
Storage: In Memory
Output:
Database Id: db_id (saved to message)

Example 3: Multiple Databases

Open multiple databases for different purposes:

Flow 1:
Open (Customers)
Database Folder: C:\RPA\databases\customers
Database Id → customer_db_id

Flow 2:
Open (Products)
Database Folder: C:\RPA\databases\products
Database Id → product_db_id

Tips for Effective Use

  • Use Disk Storage for data that needs to persist between automation runs
  • Use In-Memory Storage for temporary session data or caching
  • Create Separate Databases for different data domains to improve organization
  • Store Database ID in a variable with a descriptive name for clarity
  • Use Absolute Paths for database folders to avoid path resolution issues
  • Ensure Folder Permissions - The automation must have read/write access to the database folder

Common Errors and Solutions

Error: "database folder cannot be empty if disk storage is selected"

Solution: Provide a valid folder path in the Database Folder input when using Disk storage.

Inputs:
Database Folder: C:\RPA\databases\mydb
Options:
Storage: Disk

Error: "unknown storage type"

Solution: Ensure the Storage option is set to either "In Memory" or "Disk".

Error: Permission Denied

Solution: Ensure the automation has write permissions to the specified database folder. Try:

  • Running the automation with appropriate permissions
  • Choosing a folder where the user has write access
  • Creating the parent folder manually with proper permissions

Database Already Locked

Solution: Another process or automation might have the database open. Ensure:

  • Only one automation accesses the database at a time
  • Previous automations properly closed the database using the Close node
  • No manual processes have the database folder locked

Best Practices

  • Always Pair with Close - Use the Close node when done to release database resources
  • Handle Errors - Use try-catch blocks to handle database opening failures
  • Database Location - Store databases in a dedicated folder for easy management
  • Naming Convention - Use descriptive names for database folders (e.g., "customer-cache", "session-data")
  • Backup Important Data - Use the Backup node for databases containing critical information
  • Close - Closes the database and releases resources
  • Get - Retrieves values from the database
  • Set - Stores values in the database
  • Backup - Creates a backup of the database