Databricks
Databricks destination. Writes Nilus batch, CDC, and stream output into Unity Catalog tables via a SQL warehouse; supports PAT and OAuth M2M authentication.
Databricks is a unified platform for data engineering, analytics, and AI. Nilus writes into Databricks Unity Catalog tables for both batch and CDC pipelines through a Databricks SQL Warehouse. All tables created or loaded through this connector are Delta tables managed under the specified catalog.schema.
This page covers Databricks as a destination. Databricks can also be used as a batch source, see Databricks.
Requirements
Connectivity and credentials must both be in place before the pipeline can run.
Connectivity
The Nilus runtime must reach the Databricks workspace hostname (
<workspace>.cloud.databricks.com) on TCP443.The configured SQL Warehouse must be
Running. Auto-stopped warehouses cold-start on first connection but pipelines may time out during the warm-up if the warehouse takes too long to come up.For workspaces behind PrivateLink / IP allow-lists, verify the runtime egress IP is allowlisted on the workspace network policy.
Required parameters
server_hostname
Yes
-
Databricks workspace host, e.g. dbc-123abc-def.cloud.databricks.com. Encoded as the URI authority.
http_path
Yes
-
SQL Warehouse HTTP path, e.g. /sql/1.0/warehouses/abc123def456.
catalog
Yes
-
Unity Catalog name.
schema
Yes
-
Unity Catalog schema. Required by Nilus' destination routing, keep it in the URI.
access_token
Conditional
-
Databricks Personal Access Token, encoded as the URI password (databricks://token:<pat>@…). Required when not using OAuth M2M.
client_id
Conditional
-
OAuth M2M service-principal client ID. Use with client_secret instead of access_token.
client_secret
Conditional
-
OAuth M2M service-principal secret. Used with client_id to fetch a short-lived access token from /oidc/v1/token on the workspace.
Permissions
The token holder (PAT user or OAuth service principal) needs:
Can useon the SQL Warehouse referenced byhttp_path.USE CATALOGon the catalog andUSE SCHEMAon the schema.CREATE TABLEon the schema (only required if Nilus is expected to auto-create the destination Delta table).MODIFYon the destination tables.
URI format
PAT authentication:
OAuth M2M (service-principal) authentication:
Note When
client_idandclient_secretare both present, Nilus exchanges them for a short-lived access token athttps://<server_hostname>/oidc/v1/tokenbefore opening the SQL connection. The PAT in the URI password is ignored on this code path.
Sink options
dest_table
Yes
Either a bare table name (uses the URI's schema) or <schema>.<table> (overrides the URI's schema).
incremental_strategy
Yes
One of append, replace, merge. CDC sinks should use merge (current state) or append (event log); avoid replace for CDC.
Sample Nilus configs
Each example below is self-contained and uses the current Nilus pipeline shape.
Batch ingestion (PAT)
CDC ingestion (OAuth M2M)
Behavior and capabilities
Compute model: the Databricks SQL Warehouse identified by
http_pathexecutes all DDL / DML. Nilus connects as a SQL client.Object model: Unity Catalog Delta tables. The destination is fully described by
<catalog>.<schema>.<table>.Supported pipeline types:
batchandcdc.dest_tableresolution: ifdest_tablecontains a dot it overrides the URI'sschema; if it is a bare table name, Nilus joins it with theschemafrom the URI. The destination raisesTable name must be in the format <schema>.<table>, or specify schema in the URIif neither is set.mergerequirements: define aprimary_keyon the dataset in the manifest so Databricks canMERGE INTOthe target table cleanly.
Troubleshooting
Databricks URI must include a server hostname
The URI authority is empty.
Encode the hostname into the URI authority (databricks://token:<pat>@<host>...).
Databricks URI must include an access token or client_id/client_secret
Neither PAT nor OAuth credentials supplied.
Use either the PAT form (token:<pat>@) or the OAuth M2M form (client_id + client_secret).
Failed to obtain Databricks OAuth token: HTTP 401
OAuth client ID / secret mismatch, or the service principal lacks workspace access.
Rotate the secret, confirm the SP is added to the workspace, and confirm the SP has access to the SQL Warehouse.
Invalid HTTP Path / "Endpoint is not running"
SQL Warehouse stopped, deleted, or the http_path has the wrong warehouse ID.
Restart the warehouse and confirm http_path matches the warehouse's "JDBC URL" copy from the Databricks UI.
Table name must be in the format <schema>.<table>, or specify schema in the URI
dest_table is a bare table name and the URI has no schema query parameter.
Either add schema=<schema> to the URI or supply <schema>.<table> in dest_table.
merge runs duplicate rows
Manifest is missing a primary key.
Add a primary_key to the dataset spec; Databricks needs it to drive the MERGE join.
Related docs
Databricks: companion batch source connector.
Optimize sink datasets: guidance on
incremental_strategyand dataset-shape tuning for Delta tables.
Last updated
Was this helpful?