Connectors / Databases

DuckDB

sink

DuckDB sink; transaction-wrapped multi-row INSERT (JSON column or auto-mapped)

Install

cargo install faucet-cli --features sink-duckdb
faucet init --sink duckdb
# Cargo.toml — use it as a library
cargo add faucet-sink-duckdb

Starter config

sink:
  type: duckdb
  config:
    database: ""    # REQUIRED — Path to the DuckDB database file, or `:memory:`.
    table_name: ""    # REQUIRED — Target table name.
    # column_mapping: null    # How to map JSON records to table columns.
    # batch_size: 1000    # Maximum number of rows per multi-row INSERT.
    # create_table: true    # Create the target table if it does not exist, inferring the columns from the first written page (#580).
    # sandbox: false    # Confine the connection to the target database: no file or network access, no extension install/autoload, and the configuration locked.

Capabilities

Delivery At-least-once
Write modes append
Exactly-once writes No
Schema evolution No
Scoped cleanup No
Staged bulk load No
Run rollback No
Compression No

Config fields

FieldTypeDefaultDescription
database
required
string — Path to the DuckDB database file, or :memory:. A duckdb:// / duckdb: scheme prefix is accepted and stripped.
table_name
required
string — Target table name.
column_mapping object json: {column: data} How to map JSON records to columns.
batch_size integer 1000 Maximum number of rows per multi-row INSERT. Defaults to DEFAULT_BATCH_SIZE (1000). batch_size = 0 writes the entire upstream slice as a single multi-row INSERT (no re-chunking).
create_table boolean true Create the target table if it does not exist, inferring the columns from the first written page (#580). Enabled by default: a first-ever sync cannot assume the destination already exists. Every inferred column is created nullable. Set false to require the table to pre-exist and fail fast when it is missing.
sandbox boolean — Confine the connection to the target database: no file or network access, no extension install/autoload, and the configuration locked. The setting applies to the whole database instance, which sinks on the same file in one process share. Defaults to false. faucet serve forces it on for every config it did not load from its own triggers file.
Get started

Your first pipeline runs in five minutes.

Install the CLI, scaffold a config, and move real data — nothing external to stand up.

curl -LsSf https://github.com/faucet-hq/faucet-stream/releases/latest/download/faucet-cli-installer.sh | sh
brew install faucet-hq/faucet-stream/faucet-cli