Before You Begin
Make sure you have the following before starting:- Workspace admin access in Databricks: You’ll need to create a service principal, generate an OAuth secret, and grant it access to a SQL warehouse and your data.
- A SQL warehouse: Conversion runs queries on a SQL warehouse, not an all-purpose cluster. Serverless warehouses start in seconds; classic and pro warehouses can take a few minutes.
- The catalog(s) you want to sync identified: Know which Unity Catalog catalogs, and optionally which schemas and tables, Conversion should be able to read from.
Step 1: Set Up Databricks Access
Conversion connects to Databricks using OAuth machine-to-machine authentication with a service principal. In this step you’ll create a service principal, generate an OAuth secret, grant it read access, and (if needed) configure network access.Create a Service Principal
We recommend creating a dedicated service principal for Conversion so its activity is easy to monitor and revoke.- In your Databricks workspace, click your username at the top right and select Settings.
- Go to Identity and access → Service principals and click Manage.
- Click Add service principal, create a new Databricks-managed service principal (e.g.
conversion_sync), and click Add. - Copy the service principal’s Application ID. This is the Client ID you’ll enter in Step 2.
On Azure Databricks, the service principal must be Databricks-managed. Microsoft Entra ID-managed service principals are not supported.
Generate an OAuth Secret
- Open the service principal and go to the Secrets tab.
- Click Generate secret. The default scope is sufficient.
- Copy the Secret; it is only shown once. You’ll paste it into Conversion in Step 2.
OAuth secrets expire after at most 730 days. To rotate, generate a new secret, then open your connection in Conversion, click Edit connection, and enter the new Client secret. Conversion tests the new secret before saving it.
Grant Read Access to Your Data
Run the following in the Databricks SQL editor as a catalog owner or admin. Replacemy_catalog and my_schema with your names, and use the service principal’s Application ID in backticks.
GRANT USE SCHEMA, SELECT ON CATALOG my_catalog instead.
The schema browser in Conversion shows only the tables the service principal has been granted.
Granting Access table-by-table
If your schema contains data Conversion shouldn’t see, grant access to specific tables instead:Grant Access to the SQL Warehouse
- In the Databricks sidebar, click SQL Warehouses and open your warehouse.
- Click Permissions, add the service principal, and give it Can use.
- Open the Connection details tab and copy the Server hostname and HTTP path. You’ll need both in Step 2.
Allow Conversion’s IP Addresses
If your workspace uses IP access lists, allow connections from Conversion’s IP addresses:
Large query results are downloaded directly from your workspace’s cloud storage. If that storage has a firewall or bucket policy, allow the same IP addresses there too.
Step 2: Connect Databricks to Conversion
- In Conversion, go to Settings → CRM & Syncing → Connections.
- Click Add Databricks connection.
- Fill in the connection details using the values from Step 1:
- Click Create connection.
A stopped classic or pro warehouse starts automatically when a sync runs, which can take a few minutes. Frequent syncs can keep the warehouse running, so use serverless or a longer schedule to manage cost.
Step 3: Create a Sync
After connecting, open your new Databricks connection and go to the Syncs tab to create a sync. Read more about Setting Up a Sync.Databricks SQL Reference
Table names
Refer to tables by their full name,catalog.schema.table. The connection has no default catalog or schema. The schema browser inserts the full name when you click a table.
The schema browser lists Unity Catalog tables only. Tables in hive_metastore can still be queried by full name.
Converting Timestamps
Conversion expects Unix timestamps for date/time fields. Useunix_timestamp() to convert TIMESTAMP columns:
Using last_sync_time
For incremental syncing, compare yourTIMESTAMP column with from_unixtime({{last_sync_time}}). The variable is an integer in Unix seconds, so don’t wrap it in quotes:
updated_at might be slightly stale, subtract seconds before converting:
Building Nested Objects with named_struct
Usenamed_struct to create nested objects like relationshipFields:
Handling NULLs
UseCOALESCE or NVL to provide default values:
Casting Types
UseCAST to convert between types:
Troubleshooting
”Permission denied” errors
Ensure your service principal has the required grants:- Can use on the SQL warehouse
USE CATALOGon the catalogUSE SCHEMAon the schemaSELECTon each table you want to query
”Could not connect” errors
Verify that:- The server hostname is the workspace hostname only, without
https://or a path - The HTTP path points to a SQL warehouse (
/sql/1.0/warehouses/...), not a cluster - The Client ID is the service principal’s Application ID and the secret has not expired
- Conversion’s IP addresses are allowed if your workspace uses IP access lists
Previews work but syncs fail
Syncs download large results from your workspace’s cloud storage. If that storage has a firewall or bucket policy, allow Conversion’s IP addresses there as well.Sync taking too long
- Ensure you’re filtering by
last_sync_timeto reduce rows - Select only the columns you need
- Consider using a larger or serverless SQL warehouse
- Reduce sync frequency for large datasets
Frequently Asked Questions
What Databricks permissions does Conversion need?
What Databricks permissions does Conversion need?
The service principal needs Can use on the SQL warehouse, plus
USE CATALOG, USE SCHEMA, and SELECT on the data you want to sync. Conversion only reads data; it never writes to your Databricks workspace.Can I use a personal access token?
Can I use a personal access token?
No. Conversion connects with OAuth using a Databricks-managed service principal.
How do I sync from multiple catalogs or schemas?
How do I sync from multiple catalogs or schemas?
Grant the service principal access to each one and use full table names in your query: