Skip to main content
Run a SQL query on a Databricks SQL warehouse and return the rows: a read-only statement (SELECT, WITH, SHOW, DESCRIBE or EXPLAIN) over Unity Catalog tables. Runs in a read-only session, so it can never change data; use databricks_execute_statement for INSERT, UPDATE, MERGE or DDL. The connection can only read tables its Databricks identity has SELECT on.

Inputs

StatementParameter

Output

Type: Dict Returns rows and metadata. rows: one object per row, keyed by column name, with numbers and booleans converted (integers and decimals too large for a JavaScript number stay text); dates, timestamps and complex types stay as Databricks returns them. metadata: statement_id, warehouse_id, total_row_count, truncated (true when row_limit cut the result) and columns (name and type_text). Fields: rows, metadata