Skip to main content
Execute any SQL statement on a Databricks SQL warehouse, including ones that change data: INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER and DROP. One statement per call; to only read data use databricks_execute_read_only_statement. The connection’s Databricks identity needs write privileges (MODIFY on the table, CREATE TABLE on the schema), or Databricks refuses the change.

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). A statement that changes data returns one row with num_affected_rows and, for inserts, num_inserted_rows. Fields: rows, metadata