Connectors
Databases & Data Warehouses
DuckDB
Embedded analytics database: run SQL, insert and delete rows, and read table definitions
- Signs in with
- Connection details
- Runs on
- Cloud or On-Prem Worker
- Operations
- 21
- Ready-made triggers
- 0
Connect DuckDB
- In Neblex open Connect › Connections and click New Connection.
- Search for DuckDB and give the connection a clear name.
- Fill in the fields. Secret values are encrypted and never shown again.
- Click Test, then Create Connection.
If the system is only reachable inside your network, choose an On-Prem Worker under Test from and run the flow on that Worker. See On-Prem Workers.
| Field | What to enter |
|---|---|
| Database fileRequired | The full path of the DuckDB database file on the machine where the On-Prem Worker runs.Example: /var/lib/app/data.duckdb |
| Open read-onlyOptional | Open the file for reading only, so no step using this connection can change it. |
| Create the file if it does not existOptional | Create an empty DuckDB database at this path when no file exists yet. Leave off to report a missing file instead. |
Use it in a flow
- Open a flow, open the node library and search for DuckDB.
- Drag it onto the canvas and choose an Operation and your connection.
- Map the operation's fields from earlier steps, or click Map with Matt.
- Use Test this step to see what it returns, then save.
To start a flow from DuckDB without a ready-made trigger: a Poll for changes trigger on DuckDB with your own query passes on new or changed records.
Operations
21 operations in 3 groups. Each one is a step you can add to a flow.
Database5
Get current timeserverTime | Return the current time as DuckDB reports it. | |
Get database informationdatabaseInfo | Return the size, block usage, write-ahead log size and memory use of every attached database. | |
Get engine versionserverVersion | Return the version and source id of the DuckDB engine that opens the file. | |
List attached databaseslistDatabases | List the attached databases with their file, type and whether they are read-only. | |
Write changes to the filecheckpoint | Write every committed change from the write-ahead log into the database file. |
Schema7
Get table definitiongetTableDefinition | Return the CREATE statement of a table or view. | |
Get table statisticstableStatistics | Return the estimated row count and column count of a table. | |
List schemaslistSchemas | List the schemas of every attached database. | |
List table columnslistColumns | List the columns of a table with their type, nullability, default and numeric precision. | |
List table constraintslistConstraints | List the primary key, unique, foreign key, check and not-null constraints of a table with their columns. | |
List table indexeslistIndexes | List the indexes of a table with their uniqueness and definition. | |
List tableslistTables | List tables and views with their database, schema and type. |
SQL9
Delete rows (mapped)delete | Delete the row matching the key columns of each record. | |
Execute commandcommand | Execute the DuckDB INSERT, UPDATE, DELETE, COPY or DDL statement entered in the statement editor. | |
Execute queryquery | Execute the DuckDB query entered in the statement editor with bound :name parameters. | |
Insert rows (mapped)insert | Insert one row per record into a table you pick, mapping each column from the record. | |
Run SQL scriptscript | Run several DuckDB statements separated by semicolons, in order and in one transaction, with bound :name parameters. | |
Select rows (mapped)select | Read rows from a table you pick: choose the columns to return, filter by the column values you map, order and limit. | |
Test DuckDBping | Open the database file and return ok=1. | |
Update rows (mapped)update | Update the row matching the key columns of each record, setting the other mapped columns. | |
Upsert rows (mapped)upsert | Insert one row per record, or update the existing row when the key columns already match. |