> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Databricks Connector

> Set up a Databricks connector so Replit Agent can build data-driven applications backed by your Databricks workspace.

<Info>
  The Databricks connector is available exclusively on the **Enterprise** plan.
</Info>

<Frame>
  <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/templates-dropdown-zoom.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=92d2df97ba167b7fd5b9dfe7509e7dfa" alt="Replit home prompt box with the Templates dropdown open, showing the Databricks App org template" width="1680" height="300" data-path="images/connectors/databricks/templates-dropdown-zoom.png" />
</Frame>

The Databricks connector lets Replit Agent query your Databricks workspace. Builders can create dashboards, reporting tools, and data applications using natural language. No SQL expertise required.

Setup is a one-time process that involves a Databricks admin and a Replit organization admin. Once configured, builders with access can use the connector from Replit.

This guide covers the full setup across three roles:

1. **Databricks admin**: creates the service principal and grants permissions in Databricks.
2. **Replit admin**: configures the connector in Replit.
3. **Builder**: starts building with Databricks data.

## Prerequisites

Before you start, confirm the following.

**Roles**

* [Databricks](https://www.databricks.com/) account admin or workspace admin
* [Replit](https://replit.com/) organization admin

## Step 1: Create a service principal in Databricks

<Note>
  You must be a Databricks account admin or workspace admin to complete this step.
</Note>

The Databricks admin creates a machine-to-machine identity, called a [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals), that Replit uses to connect to Databricks.

<Steps>
  <Step title="Open Settings">
    In Databricks, select your avatar in the top-right corner, then select **Settings**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/settings-menu.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=4179d36f68585cf88af24ab86d960694" alt="Databricks workspace menu with Settings selected" width="3438" height="1984" data-path="images/connectors/databricks/settings-menu.png" />
    </Frame>
  </Step>

  <Step title="Select Identity and access">
    In the Settings sidebar, select **Identity and access**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/settings-page.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=8e22324831c8804b135a3b5e550e7f45" alt="Databricks Settings page with Identity and access in the sidebar" width="3438" height="1984" data-path="images/connectors/databricks/settings-page.png" />
    </Frame>
  </Step>

  <Step title="Manage service principals">
    Under **Management and permissions**, find **Service principals** and select **Manage**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/identity-and-access.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=4c502716a573596cbe0550644036654d" alt="Identity and access settings page showing the Service principals Manage button" width="3438" height="1984" data-path="images/connectors/databricks/identity-and-access.png" />
    </Frame>
  </Step>

  <Step title="Add a new service principal">
    Select **Add service principal**, then select **Add new**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/add-service-principal.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=ca1c2ec068049bd48b2c590d9cae4b3f" alt="Add service principal dialog with the Add new button" width="3438" height="1984" data-path="images/connectors/databricks/add-service-principal.png" />
    </Frame>
  </Step>

  <Step title="Name the service principal">
    Enter a clear name for the service principal, then select **Add**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/add-service-principal-name.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=f2490e64e7bb1516e153f7690da5c9a2" alt="Add service principal dialog with a service principal name entered" width="3438" height="1984" data-path="images/connectors/databricks/add-service-principal-name.png" />
    </Frame>
  </Step>

  <Step title="Confirm the service principal details">
    After Databricks creates the service principal, confirm it is active. Keep this page open if you need the service principal details while configuring the Replit connector.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/service-principal-details.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=ffdb270b49e7b6a330c3691358b8234b" alt="Databricks service principal details page" width="3438" height="1984" data-path="images/connectors/databricks/service-principal-details.png" />
    </Frame>
  </Step>

  <Step title="Grant access">
    Open the **Permissions** tab, select **Grant access**, choose the service principal, set the permission to **Manage**, then select **Save**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/grant-access.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=ee85ab8f1741b86f830efcd80427a596" alt="Grant access dialog for a Databricks service principal with Manage permission selected" width="3438" height="1984" data-path="images/connectors/databricks/grant-access.png" />
    </Frame>
  </Step>
</Steps>

## Step 2: Get your SQL Warehouse connection details

The Replit connector needs Databricks SQL Warehouse connection details to route queries to the right compute resource.

<Steps>
  <Step title="Open SQL Warehouses">
    In the Databricks sidebar, select **SQL Warehouses**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/sql-warehouses.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=8610ede28b6a723fd5774fb9e97c7485" alt="Databricks SQL Warehouses page showing available warehouses" width="3438" height="1984" data-path="images/connectors/databricks/sql-warehouses.png" />
    </Frame>
  </Step>

  <Step title="Select or create a warehouse">
    Select the SQL Warehouse you want Replit Agent to use. If you do not already have one, select **Create SQL warehouse** and create a new warehouse.
  </Step>

  <Step title="Copy connection details">
    Open the warehouse and select **Connection details**. Locate the **Server hostname** and **HTTP path** values. You need these values when creating the Databricks connector in Replit.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/connection-details.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=b2e51207eb945f4e9e939caa093c2b23" alt="Databricks SQL Warehouse connection details page with server hostname and HTTP path" width="3438" height="1984" data-path="images/connectors/databricks/connection-details.png" />
    </Frame>
  </Step>
</Steps>

## Step 3: Create the Databricks connector in Replit

<Note>
  You must be a Replit organization admin to configure connectors.
</Note>

The Replit admin adds the Databricks connection details to Replit so builders can use the connector.

<Steps>
  <Step title="Navigate to Integrations">
    From your organization home, open the **Integrations** page. Under **Connectors**, find **Databricks (Service Principal)** and select **Sign in**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/integrations-databricks-signin.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=f3b1558a4d4afc021fd7b2be96004ea7" alt="Replit Integrations page filtered to Databricks, showing the Databricks (Service Principal) connector with a Sign in button" width="3436" height="1978" data-path="images/connectors/databricks/integrations-databricks-signin.png" />
    </Frame>
  </Step>

  <Step title="Confirm the connection">
    Replit shows a confirmation dialog before redirecting to Databricks for authentication. Review the details and select **Continue to Databricks**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/connect-databricks-intro.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=d1bd23f4bb71d62a555993b106f4596e" alt="Connect Databricks dialog explaining the OAuth redirect, data usage, and permissions" width="3436" height="1978" data-path="images/connectors/databricks/connect-databricks-intro.png" />
    </Frame>
  </Step>

  <Step title="Enter the SQL Warehouse HTTP path">
    Paste the **HTTP path** from your Databricks SQL Warehouse connection details (for example, `/sql/1.0/warehouses/abcdef1234567890`), then select **Next**.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/connector-http-path.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=c68fa0868bed7dbd56c46f3be3bbc4b3" alt="Connect Databricks dialog step 1 of 2 prompting for the SQL Warehouse HTTP path" width="3436" height="1978" data-path="images/connectors/databricks/connector-http-path.png" />
    </Frame>
  </Step>

  <Step title="Enter the SQL Warehouse server hostname">
    Paste the **Server hostname** from the same connection details (for example, `abc-12345678-wxyz.cloud.databricks.com`), then select **Continue to Databricks** to complete authentication.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/connector-server-hostname.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=0b8210206a0941725aa1eb71a2b1d99e" alt="Connect Databricks dialog step 2 of 2 prompting for the SQL Warehouse server hostname" width="3436" height="1978" data-path="images/connectors/databricks/connector-server-hostname.png" />
    </Frame>
  </Step>

  <Step title="Configure access">
    Use Role-Based Access Control to choose which members or groups in your organization can use this connector.
  </Step>

  <Step title="Verify the connector is active">
    Back on the **Integrations** page, confirm that **Databricks (Service Principal)** appears under **Connectors** with an **Active** connection status.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/integrations-page.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=f2bb0eac84b4d08e7d7213f5aa5e1a9f" alt="Replit Integrations page showing the Databricks (Service Principal) connector with an Active connection status" width="1680" height="1199" data-path="images/connectors/databricks/integrations-page.png" />
    </Frame>
  </Step>
</Steps>

## Step 4: Build with Agent

After connecting, builders can create applications that use Databricks data with Agent.

<Steps>
  <Step title="Start a project">
    From your Replit home, open the prompt box to start a new project.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/home-default.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=36baeac209507cbe0cb8a0f5a14a7c5d" alt="Replit home page with the prompt box and Templates dropdown" width="1680" height="1199" data-path="images/connectors/databricks/home-default.png" />
    </Frame>
  </Step>

  <Step title="Select the Databricks App template">
    Open the **Templates** dropdown and choose **Databricks App** under **Org templates**. The prompt is prefilled with instructions that tell Agent how to use your Databricks connector.

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/templates-dropdown.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=707bf8f7247ef849e1064d33dfa09d3a" alt="Templates dropdown open showing the Databricks App template under Org templates" width="1680" height="1199" data-path="images/connectors/databricks/templates-dropdown.png" />
    </Frame>

    Add your own prompt after the prefilled instructions to describe what you want to build. For inspiration, browse the [Databricks Dev Hub templates](https://www.databricks.com/devhub/templates).

    <Frame>
      <img src="https://mintcdn.com/replit/xfCoeTDIPMvB7evM/images/connectors/databricks/agent-prompt-filled.png?fit=max&auto=format&n=xfCoeTDIPMvB7evM&q=85&s=edc9c3d4e326a265ce3a20dfd5d2bc00" alt="Prompt box with the Databricks App template selected and prefilled instructions" width="1680" height="1199" data-path="images/connectors/databricks/agent-prompt-filled.png" />
    </Frame>
  </Step>

  <Step title="Review and iterate">
    Review the SQL Agent generates, the tables it queries, and the application structure. Iterate by asking for changes in natural language.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication fails after creating the service principal">
    Verify that the service principal details entered in Replit match the service principal created in Databricks. If credentials were rotated, update the connector in Replit.
  </Accordion>

  <Accordion title="Agent can see schemas but queries return empty results">
    The service principal may have metadata access but no read permission on the data. Grant the required table, schema, or catalog permissions in Databricks and try again.
  </Accordion>

  <Accordion title="The connector cannot reach the SQL Warehouse">
    Verify the **Server hostname** and **HTTP path** values match the SQL Warehouse connection details in Databricks.
  </Accordion>
</AccordionGroup>

## Related documentation

* [Warehouse connectors overview](/connectors/warehouses/overview): all supported warehouse connectors.
* [Connect Snowflake](/connectors/warehouses/snowflake): step-by-step Snowflake setup.
* [Managing your connectors](/replitai/managing-connectors): connector management and configuration.
* [Databricks service principals](https://docs.databricks.com/en/admin/users-groups/service-principals.html): Databricks documentation on service principals.
* [Databricks SQL Warehouses](https://docs.databricks.com/en/compute/sql-warehouse/index.html): Databricks documentation on SQL Warehouse compute.
