Skip to main content

Setting up Databricks as a data source

To connect to Databricks, you need to provide GrowthBook with the connection details and access token to the SQL Warehouse you use within Databricks.

1. Find the connection details for your SQL Warehouse

In your Databricks instance, navigate to the SQL Warehouses, select your SQL Warehouse that stores the data you want GrowthBook to access, and the click Connection Details. You should see the following page, which contains most of the fields needed to connect GrowthBook to your Databricks SQL Warehouse.

Finding SQL Warehouse Connection Details in Databricks

2. Create an access token for GrowthBook

There are two kinds of access tokens that will work to connect GrowthBook to Databricks:

  • A personal access token for a user account
  • A personal access token for a service principal

Whichever path you choose, ensure the service principal or the user has permission to execute SQL queries against your SQL Warehouse.

Follow these instructions to create a service principal and create an access token for the service principal: https://docs.databricks.com/en/dev-tools/service-principals.html

Alternatively, you can create a personal access token for a Databricks workspace user following these instructions: https://docs.databricks.com/en/dev-tools/auth.html#pat

3. Add credentials to GrowthBook

Now that you have the connection details and an access token, you can enter the Connection Details and Access Token to GrowthBook when when creating a Data Source!

Click "Add a Datasource" from the Data Sources page under Metrics and Data and either select your event tracker or click "custom data source". Then you can select Databricks as your data warehouse and enter the above credentials.

Note: We only use the event tracker (e.g. Snowplow, Segment) to help us build queries for you. This information does not impact how or whether we are able to connect to Databricks.