
Databricks Lakebase Batch
CertifiedRun a parameterized batch against Databricks Lakebase
Databricks Lakebase Batch
Run a parameterized batch against Databricks Lakebase
Mints a short-lived OAuth database credential, then executes a prepared SQL statement once per parameter group or once per row from an Ion file in internal storage. Intended for bulk insert and update workloads.
type: io.kestra.plugin.databricks.lakebase.BatchExamples
Batch-insert rows produced by an upstream task
id: lakebase_batch_insert
namespace: company.team
inputs:
- id: rows
type: ARRAY
itemType: STRING
tasks:
- id: insert_rows
type: io.kestra.plugin.databricks.lakebase.Batch
workspaceHost: "{{ secret('DATABRICKS_HOST') }}"
clientId: "{{ secret('DATABRICKS_CLIENT_ID') }}"
clientSecret: "{{ secret('DATABRICKS_CLIENT_SECRET') }}"
endpoint: "{{ secret('LAKEBASE_ENDPOINT_NAME') }}"
database: "orders_db"
sql: "INSERT INTO orders_audit (payload) VALUES (?)"
parameterGroups:
- parameters: "{{ inputs.rows }}"
Properties
clientId *string
OAuth M2M client ID
Service principal client ID (UUID). Also used as the Postgres username when connecting to Lakebase.
clientSecret *string
OAuth M2M client secret
Service principal OAuth secret used to mint a short-lived Lakebase database credential. Render from secrets.
database *string
Postgres database name
Database to open after authentication, e.g. databricks_postgres or orders_db
endpoint *string
Lakebase endpoint resource name
Passed to generateDatabaseCredential. Format: projects/
sql *string
SQL statement to execute
Prepared statement with JDBC ? placeholders, rendered with flow variables
workspaceHost *string
Databricks workspace host
Workspace URL used by the Databricks SDK to mint a Lakebase database credential, e.g. https://
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
{}1150batchSize integerstring
1000JDBC batch size
Number of rows added to the prepared statement before executeBatch. Default: 1000
from string
Ion file of rows to bind
Internal storage URI of an Ion file produced by a previous task (for example Query with fetchType STORE). Each row is a map or a list bound to the SQL placeholders.
host string
Lakebase Postgres hostname
Optional. When omitted, the hostname is resolved from the endpoint via the Databricks Postgres API (status.hosts.host).
parameterGroups array
Parameter groups for the prepared statement
Each group supplies values for one or more executions. A group's parameters may be a single
row (a list of values), a list of rows, or — when the SQL has a single placeholder — a list
of scalars that each become their own row.
io.kestra.plugin.databricks.lakebase.Batch-ParameterGroup
Parameter values
A single row (list of values), a list of rows, or — when the SQL has one placeholder — a list of scalars
port integerstring
5432Lakebase Postgres port
Defaults to 5432
ssl booleanstring
trueEnable SSL
Lakebase requires SSL. Defaults to true.
sslCert string
SSL client certificate
PEM-encoded client certificate written to a temp file and passed to the Postgres driver as sslcert
sslKey string
SSL client key
PEM-encoded client key written to a temp file and passed to the Postgres driver as sslkey
sslKeyPassword string
SSL client key password
sslMode string
REQUIREDISABLEALLOWPREFERREQUIREVERIFY_CAVERIFY_FULLSSL mode
Postgres sslmode. Defaults to REQUIRE, which is the Lakebase-recommended setting.
sslRootCert string
SSL root certificate
PEM-encoded CA certificate written to a temp file and passed to the Postgres driver as sslrootcert
Outputs
rowCount integer
Number of rows processed
updatedCount integer
Number of rows reported updated by the driver
Metrics
query counter
The number of batch statements executed
records counter
The number of records processed
updated counter
The number of records updated