Querio

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:

  1. In your Databricks workspace, click your username in the top-right corner
  2. Go to Settings > Developer > Access tokens
  3. Click Generate new token
  4. Give it a description (e.g., "Querio integration") and set an expiry if required by your policy
  5. 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:

  1. In your Databricks workspace, go to SQL Warehouses (or Compute for clusters)
  2. Click on the warehouse you want Querio to use
  3. Open the Connection details tab
  4. 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}
ParameterRequiredDescriptionExample
access_tokenYesThe personal access token from Step 1dapi1234abcd...
server_hostnameYesServer hostname from the connection detailsadb-1234567890.1.azuredatabricks.net
http_pathYesHTTP path from the connection details/sql/1.0/warehouses/abc123
catalogNoThe Unity Catalog namemy_catalog
schemaNoThe schema (database) within the catalogmy_schema