Skip to content

Start building

Integration · Databases

AI agents for Databricks SQL

Run SQL on a Databricks SQL warehouse with named parameters, read results, cancel a running statement, and list warehouses, tables and columns, through the Statement Execution API with a personal access token.

Actions
9
Read
6
Write
3

Actions

What your agents can do in Databricks SQL

9 actions. Each one is a tool your agents can call and a step your workflows can run.

Read 6

Look things up. Nothing changes.

  • Run a SQL query

    Runs one read-only Databricks SQL statement (SELECT, SHOW, DESCRIBE or EXPLAIN; one statement, no semicolons inside) on the warehouse and waits up to wait_seconds for it.

  • List tables

    Lists the tables and views in a catalog (optionally one schema of it) from Unity Catalog's system.information_schema, up to 500.

  • Describe a table

    Lists a table's columns in order from system.information_schema: each column's name, full data type, whether it can be null, its default and its comment.

  • Get a statement's status and results

    Checks a statement by its statement_id: status.state.

  • Get more result rows

    Reads one more chunk of a finished statement's rows, by statement_id and the chunk index from result.next_chunk_index (chunk 0 came with the statement).

  • List SQL warehouses

    Lists the SQL warehouses the token's user can use, as warehouses.

Write 3

Create, change or send.

  • Insert, update or create

    Runs one statement that adds or changes data: INSERT INTO (not INSERT OVERWRITE or REPLACE WHERE / REPLACE USING), UPDATE, or CREATE (not CREATE OR REPLACE): a table, view, schema or function.

  • Run any SQL statementDeletes data

    Runs any one Databricks SQL statement the token's user may run, including MERGE, DELETE, DROP, TRUNCATE, ALTER, INSERT OVERWRITE, INSERT ...

  • Cancel a running statement

    Asks Databricks to cancel a statement that is still running, by its statement_id.

A person can approve first

Any write action can be set to wait for a person's approval before it runs, so an agent asks before it changes anything. Actions that delete data ask first by default.

Connection

How it connects

Connect it once in the console, then give it to the agents and workflows that need it.

API key

Paste an API key from your Databricks SQL account.

What you enter

  • Personal access token

Settings

  • Workspace URL
  • SQL warehouse ID

Kept safe

  • Credentials are stored encrypted with your organization's own keys.
  • They are opened only by the process that makes the call, at the moment it runs, and never go into a prompt or the browser.
  • Calls go only to the tool's own servers.

How we protect your data

Ideas

Ideas to start with

Starting points made only from the actions above. Mix them with any other tool your agents can use.

  • 01

    Ask about your Databricks SQL data

    Ask a question in plain words. The agent can run a SQL query, list tables or describe a table in Databricks SQL, then answers with what it found.

  • 02

    Let an agent update Databricks SQL

    Have the agent insert, update or create or cancel a running statement in Databricks SQL as part of a larger task. Turn on approval and a person signs off on each change first.

  • 03

    Share what it finds in Slack

    Give one agent Databricks SQL and Slack: it can run a SQL query in Databricks SQL and post a summary to a Slack channel in the same run.

FAQ

Databricks SQL and MyDeepAgents

Can MyDeepAgents connect to Databricks SQL?

Yes. The Databricks SQL connector has 9 actions: 6 read and 3 make changes. Your agents can call them as tools, and your workflows can run them as steps.

How do I connect Databricks SQL?

Paste an API key from your Databricks SQL account. You'll need: Personal access token. The connection also asks for: Workspace URL and SQL warehouse ID. Credentials are stored encrypted with your organization's own keys and are opened only at the moment of a call.

Can an agent change data in Databricks SQL without asking?

Only if you let it. Each of the 3 actions that change data can be set to wait for a person's approval before it runs, and the one that deletes data asks first by default.

Can I use Databricks SQL in workflows as well as agents?

Yes. Every Databricks SQL action also works as a step in a workflow, and the same connection serves your agents and your workflows.

Early access

Put Databricks SQL to work

Connect it in a few minutes, give an agent the actions it needs, and decide which changes wait for a person.