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

  1. In Neblex open Connect › Connections and click New Connection.
  2. Search for DuckDB and give the connection a clear name.
  3. Fill in the fields. Secret values are encrypted and never shown again.
  4. 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.
FieldWhat to enter
Database fileRequiredThe full path of the DuckDB database file on the machine where the On-Prem Worker runs.Example: /var/lib/app/data.duckdb
Open read-onlyOptionalOpen the file for reading only, so no step using this connection can change it.
Create the file if it does not existOptionalCreate 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

  1. Open a flow, open the node library and search for DuckDB.
  2. Drag it onto the canvas and choose an Operation and your connection.
  3. Map the operation's fields from earlier steps, or click Map with Matt.
  4. 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 timeserverTimeReturn the current time as DuckDB reports it.
Get database informationdatabaseInfoReturn the size, block usage, write-ahead log size and memory use of every attached database.
Get engine versionserverVersionReturn the version and source id of the DuckDB engine that opens the file.
List attached databaseslistDatabasesList the attached databases with their file, type and whether they are read-only.
Write changes to the filecheckpointWrite every committed change from the write-ahead log into the database file.
Schema7
Get table definitiongetTableDefinitionReturn the CREATE statement of a table or view.
Get table statisticstableStatisticsReturn the estimated row count and column count of a table.
List schemaslistSchemasList the schemas of every attached database.
List table columnslistColumnsList the columns of a table with their type, nullability, default and numeric precision.
List table constraintslistConstraintsList the primary key, unique, foreign key, check and not-null constraints of a table with their columns.
List table indexeslistIndexesList the indexes of a table with their uniqueness and definition.
List tableslistTablesList tables and views with their database, schema and type.
SQL9
Delete rows (mapped)deleteDelete the row matching the key columns of each record.
Execute commandcommandExecute the DuckDB INSERT, UPDATE, DELETE, COPY or DDL statement entered in the statement editor.
Execute queryqueryExecute the DuckDB query entered in the statement editor with bound :name parameters.
Insert rows (mapped)insertInsert one row per record into a table you pick, mapping each column from the record.
Run SQL scriptscriptRun several DuckDB statements separated by semicolons, in order and in one transaction, with bound :name parameters.
Select rows (mapped)selectRead rows from a table you pick: choose the columns to return, filter by the column values you map, order and limit.
Test DuckDBpingOpen the database file and return ok=1.
Update rows (mapped)updateUpdate the row matching the key columns of each record, setting the other mapped columns.
Upsert rows (mapped)upsertInsert one row per record, or update the existing row when the key columns already match.