Databricks
This is a step by step guide to integrate Databricks and Querio.
Before you start
- A Databricks workspace with a SQL Warehouse (or existing cluster).
- A personal access token or service principal token with access to the target catalog and schema.
1) Create a personal access token
What: A token that Querio will use to authenticate with your Databricks workspace.
How:
- In your Databricks workspace, click your username in the top-right corner
- Go to Settings > Developer > Access tokens
- Click Generate new token
- Give it a description (e.g., "Querio integration") and set an expiry if required by your policy
- Click Generate and copy the token — you will not be able to see it again
Databricks Documentation: Personal access tokens
Note: For production use, consider using a service principal instead of a personal access token. A service principal token is not tied to an individual user account.
2) Find your connection details
What: Locate the hostname and HTTP path for your SQL Warehouse.
How:
- In your Databricks workspace, go to SQL Warehouses (or Compute for clusters)
- Click on the warehouse you want Querio to use
- Open the Connection details tab
- Note the Server hostname and HTTP path values
Databricks Documentation: Get connection details for a SQL Warehouse
3) Grant catalog and schema permissions
What: Ensure the token's identity has read access to the target catalog and schema.
How (run in a Databricks SQL editor or notebook):
-- Grant access to the catalog
GRANT USE CATALOG ON CATALOG my_catalog TO `querio-service-principal@domain.com`;
-- Grant access to the schema
GRANT USE SCHEMA ON SCHEMA my_catalog.my_schema TO `querio-service-principal@domain.com`;
-- Grant read-only access to tables and views
GRANT SELECT ON SCHEMA my_catalog.my_schema TO `querio-service-principal@domain.com`;Important: Follow least privilege — scope grants only to the catalogs and schemas you intend Querio to read.
Databricks Documentation: Unity Catalog privileges and securable objects
4) Share the connection details
Provide the following to complete the connection:
databricks://token:{access_token}@{server_hostname}?http_path={http_path}&catalog={catalog}&schema={schema}| Parameter | Required | Description | Example |
|---|---|---|---|
access_token | Yes | The personal access token from Step 1 | dapi1234abcd... |
server_hostname | Yes | Server hostname from the connection details | adb-1234567890.1.azuredatabricks.net |
http_path | Yes | HTTP path from the connection details | /sql/1.0/warehouses/abc123 |
catalog | No | The Unity Catalog name | my_catalog |
schema | No | The schema (database) within the catalog | my_schema |