Background
The Databricks SQL Statements API supports named parameters — callers can pass {{param_name}} placeholders in the SQL and a parameters array in the request body:
{
"statement": "SELECT * FROM users WHERE id = :id",
"parameters": [{"name": "id", "value": "42", "type": "INT"}]
}
This is different from the ?/$N placeholder approach used by the other SQL connectors (MySQL, MSSQL, Redshift, Snowflake) which pass args via database/sql's variadic QueryContext.
Proposed change
Add an optional parameters param to DatabricksExecuteSQLConnector.Execute:
- action: databricks/execute_sql
params:
warehouse_id: "..."
statement: "SELECT * FROM orders WHERE user_id = :user_id AND status = :status"
parameters:
- name: user_id
value: "{{ inputs.user_id }}"
type: STRING
- name: status
value: active
type: STRING
The parameters array should be passed through to the Databricks API payload as-is (after type-asserting each entry as map[string]any). No driver-level escaping is needed — Databricks handles parameterization server-side.
Files
packages/engine/internal/connector/databricks.go — DatabricksExecuteSQLConnector.Execute
packages/engine/internal/connector/databricks_test.go — add a test asserting the parameters field is included in the request body
References
Background
The Databricks SQL Statements API supports named parameters — callers can pass
{{param_name}}placeholders in the SQL and aparametersarray in the request body:{ "statement": "SELECT * FROM users WHERE id = :id", "parameters": [{"name": "id", "value": "42", "type": "INT"}] }This is different from the
?/$Nplaceholder approach used by the other SQL connectors (MySQL, MSSQL, Redshift, Snowflake) which pass args viadatabase/sql's variadicQueryContext.Proposed change
Add an optional
parametersparam toDatabricksExecuteSQLConnector.Execute:The
parametersarray should be passed through to the Databricks API payload as-is (after type-asserting each entry asmap[string]any). No driver-level escaping is needed — Databricks handles parameterization server-side.Files
packages/engine/internal/connector/databricks.go—DatabricksExecuteSQLConnector.Executepackages/engine/internal/connector/databricks_test.go— add a test asserting theparametersfield is included in the request bodyReferences
databricks/execute_sqlas needing bound-parameter parity with the other SQL connectors)