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

  1. Inside your Databricks workspace, go to Settings → Identity and access → Service principals → Manage.

  2. Press Add service principal → Add new, choose Databricks managed, give it a name (for example weld-service-principal) and press Add.

  3. 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.

  4. Go to Secrets and generate a new secret. If you are asked to choose scopes, keep the default. Note down the Client ID and Secret; you need them during setup in Weld.

Step 2: Setup the SQL Warehouse

  1. In the Databricks console, go to SQL → Create → SQL Warehouse.

  2. We recommend starting with 2X-Small size and scaling up as your workload increases.

  3. Set the auto stop to 5 minutes, and choose the warehouse type you want. Serverless starts fastest.

  4. Go to the connection details and note down the Server hostname and HTTP path. You will need those when configuring the connection in Weld.

  5. Go to permissions, add your weld-service-principal and set Can use.

Step 3: Setup the Unity Catalog

  1. In the Databricks console, go to Catalog → + → Create a catalog.
  2. Enter a name for the catalog (for example weld) and choose a storage location.
  3. Create a new schema in the catalog, and a new volume in that schema.
  4. Copy the volume path. It looks like this: /Volumes/weld/weld_schema/weld_volume
  5. Grant the weld-service-principal access, 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:

CloudServer hostname
AWSdbc-a1b2c3d4-e5f6.cloud.databricks.com
Azureadb-1234567890123456.7.azuredatabricks.net
Google Cloud1234567890123456.7.gcp.databricks.com

You now have all the settings you need to setup Weld with Databricks and start syncing your data.

Was this page helpful?