Setting Up the Databricks SQL Tools
This guide will walk you through the steps to configure and authenticate the Databricks SQL tool and use them in agents. In this guide, you will setup the following tool:
- Databricks SQL Query Tool
Adding and Configuring the Databricks SQL Query Tool
- Add the Databricks SQL Query Tool Navigate to the library and select the "Databricks SQL Query" tool to add it to your project.
-
Provide your Databricks credentials To add the Databricks tool to your project, you will need the following details:
- Warehouse Hostname
- Warehouse Path (http)
- Warehouse Port (443 default)
- Personal Access Token for authenticated user
These details can be retrieved from your Databricks account. See the section below on how to create a user with least-priveledges to authenticate your Databricks account.
-
Retrieve your Databricks connection details from Databricks In order to connect your Databricks account, you will require your warehouse details. To retrieve this information:
- Login to your Databricks account
- Select SQL Warehouses on the sidebar
- Select an active Warehouse for a database schema you want to work with
- Select Connection Details
-
Get a Personal Access Token Airia Tools for Databricks support personal access token authentication. To retrieve your access token:
- Login with a user with read access and permissions to run SQL statements on your Warehouse
- Go to Settings
- Select Developer -> Access Tokens
- Select Manage and generate a new token.
You can find additional instructions and details about personal access token here: https://docs.databricks.com/aws/en/dev-tools/auth/pat
- Provide Databricks connection details to Tool
To configure the tool, provide the values required, inluding your warehouse details found above and your personal access token. Your databricks access token should be added as a Credentials object.
Now that the tool has been added, you can add it to an agent and use it to query your Databricks Database. See these instructions on the page: Use Databricks tools