Connect Databricks

Set up a Databricks SQL warehouse connection — the workspace host, HTTP path, and a personal access token.

This page covers connecting a Databricks SQL warehouse to Flax. Add the connection from the Data page at /app/data.

#Required fields

Field Description
host Your workspace hostname (for example dbc-xxxx.cloud.databricks.com).
http_path The HTTP path of the SQL warehouse — its trailing segment identifies the warehouse.
token A Databricks personal access token, sent as a bearer credential and stored as the connection secret, encrypted at rest.

You will find the host and HTTP path under SQL Warehouses → your warehouse → Connection details in the Databricks workspace.

Flax runs queries through the Databricks SQL Statement Execution API, so a running (or auto-starting) SQL warehouse is required.

#Least-privilege credentials

Issue the token from a dedicated service principal or a low-privilege user rather than an admin account. Grant that identity read-only access through Unity Catalog:

GRANT USE CATALOG ON CATALOG analytics TO `flax_svc`;
GRANT USE SCHEMA ON SCHEMA analytics.public TO `flax_svc`;
GRANT SELECT ON SCHEMA analytics.public TO `flax_svc`;

Tip

Give the token a fixed expiry and rotate it. Because Flax stores it encrypted and can re-test on save, replacing a rotated token is a quick edit on the Data page.

#Query execution

Queries built in Explore are compiled to the Databricks SQL dialect and pushed down to your warehouse for execution (ADR-0004). See Caching & performance for how repeat queries are served.