
Databricks Zerobus WriteRecords
CertifiedPush data directly into a Unity Catalog Delta table via Zerobus Ingest
Databricks Zerobus WriteRecords
Push data directly into a Unity Catalog Delta table via Zerobus Ingest
This task sends data to a Databricks Delta table via the push-based Zerobus Ingest REST API.
It supports at-least-once delivery. If a task is retried after a partial failure, records that were already successfully accepted in previous chunks will be sent again and may be duplicated in the target table. Kestra's HTTP client may retry a failed request once on a server error, so with at-least-once delivery a chunk can be written twice.
The task authenticates using either OAuth client credentials or a Personal Access Token (PAT).
An OAuth token is refreshed shortly before it expires, and a 401 on the ingest call triggers one refresh and one retry of that chunk. A PAT is never refreshed or retried.
Note: Databricks documents short-lived OAuth tokens from a service principal as the only authentication for Zerobus Ingest. A PAT is sent as a Bearer token but has not been verified against Zerobus; prefer OAuth client credentials.
The host property is required when using OAuth authentication. The default endpoint domain follows host: azuredatabricks.net for Azure, gcp.databricks.com for GCP, cloud.databricks.com otherwise.
Records are sent in chunks, bounded by conservative assumptions since the API docs do not specify a per-request limit.
Note: The inherited properties configFile and accountId are ignored by this task, and AbstractTask environment variable fallbacks are not honoured.
type: io.kestra.plugin.databricks.zerobus.WriteRecordsExamples
Push inline records to a Databricks Delta table
id: write_inline_records_to_databricks
namespace: company.team
tasks:
- id: write_records
type: io.kestra.plugin.databricks.zerobus.WriteRecords
host: "{{ secret('DATABRICKS_HOST') }}"
authentication:
clientId: "{{ secret('DATABRICKS_CLIENT_ID') }}"
clientSecret: "{{ secret('DATABRICKS_CLIENT_SECRET') }}"
workspaceId: "{{ secret('DATABRICKS_WORKSPACE_ID') }}"
region: us-east-1
catalog: main
schema: events
table: user_events
records:
- userId: usr_001
event: page_view
- userId: usr_002
event: purchase
Push records from an internal storage file (Ion or JSON-lines)
id: write_file_to_databricks
namespace: company.team
inputs:
- id: events_file
type: FILE
tasks:
- id: write_records
type: io.kestra.plugin.databricks.zerobus.WriteRecords
host: "{{ secret('DATABRICKS_HOST') }}"
authentication:
clientId: "{{ secret('DATABRICKS_CLIENT_ID') }}"
clientSecret: "{{ secret('DATABRICKS_CLIENT_SECRET') }}"
workspaceId: "{{ secret('DATABRICKS_WORKSPACE_ID') }}"
region: us-east-1
catalog: main
schema: events
table: raw_events
from: "{{ inputs.events_file }}"
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-databricks --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.
Properties
catalog *string
Unity Catalog catalog name
schema *string
Schema (database) name
table *string
Target Delta table name
accountId string
Databricks account identifier
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150authentication
Databricks authentication configuration
This property allows to configure the authentication to Databricks, different properties should be set depending on the type of authentication and the cloud provider. All configuration options can also be set using the standard Databricks environment variables. Check the Databricks authentication guide for more information.
io.kestra.plugin.databricks.AbstractTask-AuthenticationConfig
Authentication type
Azure client ID
Azure client secret
Azure tenant ID
Client ID
Client secret
Google credentials JSON
Google service account email
Password
Databricks personal access token
Username
configFile string
Databricks configuration file, use this if you don't want to configure each Databricks account properties one by one
endpoint string
Zerobus endpoint URL override
Replaces the computed Zerobus URL (https://<workspaceId>.zerobus.<region>.<cloud domain>). Use it for private connectivity, a proxy or tests.
from string
Internal storage URI
URI of an Ion or JSON-lines file in Kestra internal storage. Each record must be one object; a single JSON array is not supported. Mutually exclusive with 'records'.
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
host string
Databricks host
records array
Inline records
List of JSON objects. Mutually exclusive with 'from'.
region string
Cloud region
Cloud region used to build the default Zerobus endpoint, for example us-west-2 on AWS, eastus on Azure or us-east1 on GCP. Ignored when 'endpoint' is set. Required when 'endpoint' is not set.
workspaceId string
Numeric workspace ID
Used to build the Zerobus endpoint and OAuth resource parameter.
Outputs
recordsCount integer
0Records count
Total number of records successfully sent to Zerobus Ingest
Metrics
records.count counter
Number of records pushed to Zerobus Ingest