StyloDocs
Workflow blocks

Databricks

Run SQL statements, manage SQL warehouses, and trigger Databricks Jobs

View as Markdown

databricks — Run SQL statements, manage SQL warehouses, and trigger Databricks Jobs.

Where it appears

The Databricks block lives in the Integrations group of the Workflow Builder. Connect the Databricks integration before adding it.

Fields

FieldTypeRequiredDefaultDescription
resourceselectYessqlWhich Databricks resource to work with. Options: sql, jobs.
operationselectYesWhich action to perform on the selected resource.
statementcodeYesRead-only SQL only. SELECT, WITH, SHOW, DESCRIBE, DESC, and EXPLAIN are allowed; write operations are blocked.
warehouseIdtext (supports references)NoOverride the warehouse configured in the integration credentials.
catalogtext (supports references)NoOptional Databricks catalog for statement execution.
schematext (supports references)NoOptional Databricks schema for statement execution.
parameterscodeNoOptional statement parameters as an array of {name, value, type}.
rowLimittext (supports references)NoOptional maximum number of rows returned.
byteLimittext (supports references)NoOptional maximum result size in bytes.
waitTimeoutSecondstext (supports references)NoOptional server-side wait timeout before the client begins polling.
jobIdtext (supports references)YesThe numeric ID of an existing Databricks Job to trigger via run-now.
jobParameterscodeNoOptional job-level parameters as a {key: value} map (sent as job_parameters).
notebookParamscodeNoOptional notebook widget values as a {key: value} map (sent as notebook_params).
idempotencyTokentext (supports references)NoOptional token so a retried trigger does not launch the job twice.
runIdtext (supports references)YesThe run ID returned by Run Job.
includeOutputtoggleNoAlso fetch run output (notebook result / error) when the run is terminal.
limittext (supports references)NoMaximum number of jobs to return (default 25).

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <Databricks.field>.

NameTypeDescription
successbooleanWhether the request succeeded
warehousesarrayAvailable Databricks SQL warehouses
errorstringError message if failed
statementIdstringDatabricks statement ID
statusjsonStatement execution status
resultjsonDatabricks statement result payload
warehouseCountnumberNumber of visible SQL warehouses
runIdnumberThe ID of the triggered run
numberInJobnumberSequence number of this run within the job
lifeCycleStatestringRun life-cycle state (e.g. RUNNING, TERMINATED)
resultStatestringRun result state (e.g. SUCCESS, FAILED) once terminal
isTerminalbooleanTrue when the run has reached a terminal life-cycle state
stateMessagestringHuman-readable state detail
runPageUrlstringURL to the run in the Databricks UI
outputjsonRun output payload when requested
jobsarrayAvailable Databricks Jobs

Example

A minimal configuration for this block:

{
  "type": "databricks",
  "config": {
    "resource": "sql",
    "operation": "...",
    "statement": "...",
    "jobId": "<PreviousStep.field>",
    "runId": "<PreviousStep.field>"
  }
}

Limits and failure modes

  • Requires a connected Databricks integration. Calls fail if that integration is disconnected or its authorization has expired.
  • Required fields (resource, operation, statement, jobId, runId) must be set, or the block fails validation before it runs.
  • On failure the error output is populated; downstream blocks that reference other outputs may not receive values.

On this page