Skip to main content

Databricks

To add a Databricks connection, click on the Databricks option in the Connect a data source section. connect

Before you begin

Before connecting Wren AI with Databricks, log in to the Databricks UI and start your SQL Warehouse: start-warehouse

Connect

Fill in the connection settings: settings-pat

Display name

The display name for the Databricks connection in the Wren AI interface.

Server hostname

The Databricks workspace URL without the protocol.

HTTP path

The HTTP path of the SQL warehouse you will use to run queries.

How to find the server hostname and HTTP path

You can find this in Databricks → SQL WarehousesConnection details. connection

Authentication method

Choose between two authentication methods:

  • Personal Access Token
  • Service Principal

Personal Access Token

  • Access token:
    A Personal Access Token (PAT) generated from the Databricks UI. This token authenticates your Databricks user account when connecting from Wren AI. You can create or manage tokens under User Settings → Developer → Access Tokens. Keep this token secure, as it grants access to your workspace.
How to create a Personal Access Token

Create Personal Access Token

Service Principal

  • Client ID:
    The application ID of your Databricks Service Principal. You can find this in the Databricks UI under Service Principals. It identifies which service principal Wren AI should use when connecting.

  • Client secret:
    The secret associated with the Service Principal. This acts as the credential for authentication. You can generate or rotate this secret in the Databricks UI. Treat it like a password and keep it secure.

Service Principal

How to create a Service Principal

Create Service Principal

Select Tables

All tables from your connected Databricks warehouse will be listed in this step. Select the tables you want to use in Wren AI. Each selected table will be created as a data model. See the Modeling documentation to learn more about data models. select_table

Define relationships

Define the relationships among selected tables in this step. If you have defined primary keys and foreign keys in your Databricks warehouse, we will list suggested relationships based on that information. If not, you can add relationships manually by clicking the Add relationships button on the table blocks. relationship

Define the following properties in a relationship:

  • From: Select the left-side table and column.
  • To: Select the right-side table and column.
  • Relationship Type: Select the type of relationship. add_relationship

Find more information about relationships in Modeling - Working with Relationships

You can also skip this step and finish the connection.