Connectors / Warehouses

Databricks

source

Databricks SQL query source (Statement Execution API; typed rows, chunk pagination, incremental)

Install

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

Starter config

source:
  type: databricks
  config:
    workspace_url: ""    # REQUIRED — Workspace base URL, e.g.
    warehouse_id: ""    # REQUIRED — Target SQL Warehouse id.
    sql: ""    # REQUIRED — The SQL statement to run.
    auth:
      type: pat    # one of: pat, token
      config:
        token: ""    # REQUIRED — The token string (use `${env:…}` / `${vault:…}` to inject).
      # --- Alternative variants — replace the block above with one of these ---
      # type: token
      # config:
        # token: ""    # REQUIRED
    # catalog: ""    # Default Unity Catalog catalog for the statement.
    # schema: ""    # Default schema for the statement.
    # parameters: []    # Named SQL parameters (`:name` markers).
    # wait_timeout_secs: 50    # Server-side wait before the statement goes async (seconds).
    # poll_interval_secs: 1    # Client poll cadence while the statement is `PENDING`/`RUNNING` (seconds).
    # statement_timeout_secs: 3600    # Client deadline for the statement to finish, in seconds; on expiry it is cancelled and the read fails.
    # batch_size: 1000    # Page size — rows accumulated before a `StreamPage` is emitted.
    # arrow_native: false    # Fetch results as Apache Arrow instead of JSON.
    # result_disposition: null    # How the row path receives a statement's result (ignored under `arrow_native`, which always uses external links).
    # replication: { type: full }    # one of: full, incremental
      # --- Alternative variants — replace the block above with one of these ---
      # type: incremental
      # column: ""    # REQUIRED
      # initial_value: null    # REQUIRED
    # state_key: ""    # Explicit state-store key for the incremental bookmark.

Capabilities

Replay Non-deterministic replay
Exactly-once replay No
Incremental Yes
Dataset discovery No
Reports lag No
Compression No

Config fields

FieldTypeDefaultDescription
workspace_url
required
string — Workspace base URL, e.g. https://dbc-abc123.cloud.databricks.com.
warehouse_id
required
string — Target SQL Warehouse id.
sql
required
string — The SQL statement to run. May contain :name parameter markers (see parameters) and a ${bookmark} token for incremental replication.
auth
required
object — Authentication (PAT / OAuth bearer), inline or via a shared auth: { ref }.
catalog string — Default Unity Catalog catalog for the statement.
schema string — Default schema for the statement.
parameters array [] Named SQL parameters (:name markers).
wait_timeout_secs integer 50 Server-side wait before the statement goes async (seconds). Databricks accepts 0 (fully async) or 5–50. Defaults to 50.
poll_interval_secs integer 1 Client poll cadence while the statement is PENDING/RUNNING (seconds).
statement_timeout_secs integer 3600 Client deadline for the statement to finish, in seconds; on expiry it is cancelled and the read fails. 0 waits indefinitely. Defaults to 3600.
batch_size integer 1000 Page size — rows accumulated before a StreamPage is emitted. Defaults to DEFAULT_BATCH_SIZE.
arrow_native boolean false Fetch results as Apache Arrow instead of JSON. When true, the statement is submitted with EXTERNAL_LINKS disposition + ARROW_STREAM format; each chunk's presigned link is fetched and decoded as an Arrow IPC stream. This enables the **columnar** fast path (Source::stream_batches) so a databricks → parquet/delta chain skips the per-cell JSON decode.
result_disposition object external_links How the row path fetches results: external_links (default) downloads each chunk from a presigned URL, so results of any size stream; inline keeps them in the API response, which Databricks caps at 25 MiB. Use inline only when the client cannot reach the workspace's cloud storage.
replication object type: full Replication mode. Defaults to DatabricksReplication::Full.
state_key string — Explicit state-store key for the incremental bookmark. When unset, a key is derived from the workspace/warehouse and a query fingerprint.
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