Datasource setup

Connect Databricks

Configure token and warehouse access, connect Databricks in Querio, and verify a query against an approved table.

Connect a Databricks SQL warehouse so your team can query approved Unity Catalog tables in Querio. You need a token, the warehouse's connection details and access to the data you plan to use.

Before you start

  • Permission to create a datasource and manage its credentials in Querio.
  • A Databricks SQL warehouse and a workspace user or service principal that can use it. A Databricks administrator or object owner must be able to grant the required access.
  • A Unity Catalog table you are allowed to read, with a known result you can use to check the connection. Querio must be able to reach the Databricks workspace.

Querio's Databricks form uses a personal access token (PAT). It has no OAuth sign-in, client ID/secret or automatic token refresh. Databricks recommends OAuth for new integrations, so check your organization's PAT policy before starting. If PATs are prohibited, this connection form cannot meet that requirement.

1. Create an access token

For a workspace user, follow Databricks' PAT procedure:

  1. In the target Databricks workspace, open your username menu and choose Settings.
  2. Open Developer, then Manage next to Access tokens.
  3. Select Generate new token, name it and set an approved lifetime.
  4. Select the BI Tools scope type for SQL warehouse access.
  5. Generate the token and store it securely. It works only in this Databricks workspace and acts as its owner.

For a shared connection, your administrator can create a PAT for a service principal using the same Databricks guide. Grant access to that principal in the next steps. Its OAuth client secret is not a PAT and cannot go in Querio's Access token field.

Enter the token only in Querio's connection form. Keep it out of agent conversations, source control, screenshots and support messages. If token creation is disabled, ask your Databricks administrator about the policy.

2. Find connection details

In Databricks, open SQL Warehouses, select your warehouse, then open Connection Details. Copy both values from that warehouse:

Databricks valueSynthetic exampleQuerio field
Server hostnamedbc-01234567-89ab.cloud.databricks.comHost, without https:// or a JDBC prefix.
HTTP path/sql/1.0/warehouses/0123456789abcdefHttp path, exactly as shown.

Find the catalog and schema names in Catalog Explorer, for example main and analytics. Keep the HTTP path, catalog and schema out of Host. Databricks documents where to find these connection details.

This guide uses a SQL warehouse. Databricks also documents a hostname and HTTP path for all-purpose compute under Advanced Options > JDBC/ODBC, subject to its compute permissions and runtime requirements. Its SQL connector does not support jobs compute.

3. Grant catalog and schema permissions

Ask the warehouse owner to grant the token identity CAN USE on the SQL warehouse. That identity also needs a workspace entitlement that permits warehouse queries. Warehouse permissions are separate from Unity Catalog data privileges.

Have a Unity Catalog owner or administrator grant access to the table you chose. This example assumes an existing Databricks account group, querio-readers, contains the token identity. Replace every group and object name with yours:

GRANT USE CATALOG ON CATALOG main TO `querio-readers`;
GRANT USE SCHEMA ON SCHEMA main.analytics TO `querio-readers`;
GRANT SELECT ON TABLE main.analytics.orders TO `querio-readers`;

For a direct grant, use the user's email or the service principal's application ID in backticks, not its display name. See Databricks' principal syntax and GRANT reference.

Reading a table requires USE CATALOG, USE SCHEMA and SELECT. If the identity needs every table and view in a schema, GRANT SELECT ON SCHEMA main.analytics TO ... also covers future objects through privilege inheritance. Use that broader grant only when intended. See Unity Catalog privileges.

Token scopes, warehouse access and table privileges are separate checks. For a legacy Hive metastore, ask your administrator to verify its access rules; these Unity Catalog grants do not establish them.

4. Connect in Querio

Open Settings > Datasources > Add datasource, choose Internal, and enter:

FieldEnter
SlugA unique identifier such as databricks-analytics.
NameOptional display name, such as Analytics warehouse.
Database typeDatabricks.
HostThe warehouse's Server hostname.
Http pathThe warehouse's HTTP path. There is no separate warehouse-ID field.
Access tokenThe workspace PAT value.
CatalogRequired catalog name, such as main.
SchemaOptional initial schema name, such as analytics.

Enter the token in this form, not in an agent prompt. The form takes separate fields, not a JDBC or SQLAlchemy URL. See Datasources and credentials for field limits and credential replacement.

Network access

Querio connects over HTTPS. If your Databricks workspace restricts incoming traffic, ask your administrator to allow access from the Querio deployment. A valid token does not bypass an IP access list or private network controls.

Larger result downloads can use CloudFetch through cloud object storage. The connection test does not check that route, and Querio's form has no CloudFetch setting. If small queries work but larger results fail, check object-storage connectivity with your administrator. See the SQL connector's CloudFetch behavior.

Test and save

  1. Select Test connection. A successful test reports Connection successful without saving the datasource.
  2. Select Create. Querio tests again before saving; a failed test prevents creation.
  3. Check that the datasource appears in Settings > Datasources.

The test runs SELECT 1. It checks the connection and warehouse query path, not your table permissions or the data you expect. A stopped warehouse may start when the query arrives; see warehouse startup behavior.

5. Query an approved table

  1. In Context, select the datasource and choose Add tables. Add the schema or table needed for your question. Check that its columns appear and review any errors. The connection guide covers this shared setup.
  2. As the person who will use the datasource, open an Explore, select it and run this query:
SELECT 6 * 7 AS answer;

Expected: one row with answer = 42. This checks query execution and a small result, but still does not check access to your table.

  1. Query the approved table. Replace the synthetic identifiers and test value with a case whose result you know:
SELECT order_id, order_total
FROM main.analytics.orders
WHERE order_id = 'known-test-order';

Compare the result with the same query under the token identity in Databricks. If rows are missing or values differ, check the identity, filters and data policies before relying on the result.

The person querying needs datasource permission and exactly one authorized credential. The first credential is initially assigned to Everyone; review that assignment against your access policy. See Groups, and repeat the table query as a teammate if they will use this datasource.

Troubleshooting

SymptomCheck and recovery
Token rejected or expiredCheck its workspace, owner, lifetime, policy and scopes. Replace the complete saved connection when rotating the token.
Host or HTTP path failureRecopy both values from the same warehouse. Use the bare hostname and the complete HTTP path, not the workspace browser URL, warehouse ID alone or JDBC URL.
Warehouse unavailable or access deniedCheck warehouse state, the identity's workspace entitlement and CAN USE access with the warehouse owner.
Catalog/table absent or permission deniedCheck the Catalog/Schema fields and USE CATALOG, USE SCHEMA and SELECT grants for the token identity. Metadata visibility is not proof of read access.
Small queries work but result download failsCheck CloudFetch object-storage connectivity and workspace network controls.
Only one Querio user can queryReview datasource permission and credential assignments in Groups.
Query runs but the result differsCompare the identity, fully qualified table, filters and data policies with the known result. Resolve differences with the data owner.

Continue with Analyze your data and Add and improve context.

Was this page helpful?

Last updated on November 18, 2026

On this page