Databricks / Delta Lake Output
Writes data to Databricks or any Delta Lake table. Supports two modes:
- Delta Lake mode (when
delta_table_uriis set): writes Arrow batches directly to a Delta table at any object store URI (S3, Azure, GCS, local filesystem). No Databricks workspace required. - COPY mode (default): uploads Parquet to Databricks Volumes via the Files API, then optionally executes
COPY INTOvia the SQL Statement API.
How it works
Delta Lake mode
- Collects Arrow RecordBatches from the stream.
- Opens (or creates) the Delta table at the configured URI.
- Appends batches using the
deltalakewrite operation.
COPY mode
- Serializes record batches to Parquet.
- Uploads the Parquet file to Databricks Volumes via the Files API.
- Optionally executes a
COPY INTOSQL statement via the SQL Statement API.
Configuration (Delta Lake mode)
yaml
data_sinks:
sink:
Databricks:
delta_table_uri: "s3://my-bucket/delta-table"
storage_options:
AWS_REGION: us-east-1Configuration (COPY mode)
yaml
data_sinks:
sink:
Databricks:
workspace_url: "https://my-workspace.cloud.databricks.com"
token: "dapi..."
warehouse_id: "abc123"
catalog: main
schema: default
table: eventsConfiguration variables
| Variable | Default | Description |
|---|---|---|
delta_table_uri | Delta table URI. When set, enables Delta Lake mode (s3://, az://, gs://, file:///) | |
storage_options | Key-value map for object store auth (e.g. AWS_REGION, AWS_ACCESS_KEY_ID) | |
workspace_url | Databricks workspace URL (COPY mode) | |
token | Personal access token (COPY mode) | |
warehouse_id | SQL warehouse ID (enables COPY INTO in COPY mode) | |
catalog | main | Unity Catalog name (COPY mode) |
schema | default | Schema name (COPY mode) |
table | data | Target table name (COPY mode) |
format | parquet | Output format |
Authentication
Configure workspace_url, token, and optional warehouse_id directly when you connect the warehouse or in skippr.yml.
For security best practices, we strongly advise against storing the token in skippr.yml. Use environment variable interpolation instead: replace the token value with your own ${ENV_VAR} reference.
The relevant part of skippr.yml looks like this:
yaml
data_sinks:
warehouse:
Databricks:
token: "${DATABRICKS_TOKEN}"Set the env var before running skipprd:
macOS / Linux
bash
export DATABRICKS_TOKEN="dapi..."Windows PowerShell
powershell
$env:DATABRICKS_TOKEN = "dapi..."Windows Command Prompt
cmd
set DATABRICKS_TOKEN=dapi...Troubleshooting
| Symptom | Fix |
|---|---|
| authentication failed | Verify the workspace URL, token, and any SQL warehouse ID values. |
| writes or COPY INTO fail | Check catalog and schema permissions, warehouse availability, and whether the token can use that SQL warehouse. |
