Databricks
Databricks is a unified data analytics platform that provides a collaborative environment for data scientists, engineers, and business analysts. It is built on top of Apache Spark and provides a fully managed, scalable, and secure cloud-based platform for big data analytics.
Weld supports Databricks on AWS, Microsoft Azure and Google Cloud. Databricks can also be used as an ELT source, and one connection can serve both.
🔧 Setup Guide for Databricks in Weld
Weld writes the synced data as files into a Unity Catalog volume. It connects as a service principal with OAuth machine-to-machine credentials, through a SQL warehouse.
Step 1: Configure Databricks service principal
-
Inside your Databricks workspace, go to
Settings → Identity and access → Service principals → Manage. -
Press Add service principal → Add new, choose Databricks managed, give it a name (for example
weld-service-principal) and press Add. -
Open the service principal and go to Configurations. Make sure Databricks SQL access is checked. Without it, Databricks refuses every request from the service principal.
-
Go to Secrets and generate a new secret. If you are asked to choose scopes, keep the default. Note down the
Client IDandSecret; you need them during setup in Weld.
On Azure: use a secret generated in Azure Databricks. A client secret from Microsoft Entra ID does not work.
Step 2: Setup the SQL Warehouse
-
In the Databricks console, go to
SQL → Create → SQL Warehouse. -
We recommend starting with 2X-Small size and scaling up as your workload increases.
-
Set the auto stop to 5 minutes, and choose the warehouse type you want. Serverless starts fastest.
-
Go to the connection details and note down the
Server hostnameandHTTP path. You will need those when configuring the connection in Weld. -
Go to permissions, add your
weld-service-principaland set Can use.
Step 3: Setup the Unity Catalog
- In the Databricks console, go to
Catalog → + → Create a catalog. - Enter a name for the catalog (for example
weld) and choose a storage location. - Create a new schema in the catalog, and a new volume in that schema.
- Copy the volume path. It looks like this:
/Volumes/weld/weld_schema/weld_volume - Grant the
weld-service-principalaccess, replacing the names and the Client ID:
Grant access to the volume
GRANT USE CATALOG ON CATALOG weld TO `<client-id>`;
GRANT USE SCHEMA ON SCHEMA weld.weld_schema TO `<client-id>`;
GRANT READ VOLUME, WRITE VOLUME ON VOLUME weld.weld_schema.weld_volume TO `<client-id>`;
Step 4: Connect Weld
In Weld, add a Databricks connection and pick the form for your cloud: Databricks on AWS, Databricks on Azure or Databricks on Google Cloud. Fill in the server hostname, HTTP path, Client ID, secret and the volume path from the steps above.
The hostname looks different on each cloud:
| Cloud | Server hostname |
|---|---|
| AWS | dbc-a1b2c3d4-e5f6.cloud.databricks.com |
| Azure | adb-1234567890123456.7.azuredatabricks.net |
| Google Cloud | 1234567890123456.7.gcp.databricks.com |
You now have all the settings you need to setup Weld with Databricks and start syncing your data.