Skip to main content
The Databricks connectors are available exclusively on the Enterprise plan.
Replit home prompt box with the Templates dropdown open, showing the Databricks App org template
The Databricks connectors let Replit Agent query your Databricks workspace. Builders can create dashboards, reporting tools, and data applications using natural language. No SQL expertise is required. Replit supports two Databricks connection types. Choose one based on the identity that should run each query.

Choose a connection type

Set up user-to-machine (U2M)

Use each builder’s Databricks identity, permissions, and audit attribution.

Set up a service principal (M2M)

Use one shared Databricks identity and permission set for authorized builders.

Set up the U2M connector

U2M setup involves three roles:
  1. Databricks account admin: creates an OAuth app connection and provides SQL Warehouse details.
  2. Replit organization admin: configures the connector with the OAuth credentials.
  3. Builder: signs in with their Databricks account and starts building.

U2M prerequisites

Before you start, confirm you have:
  • A Databricks account admin. App connections are configured in the account console, not the workspace admin settings.
  • A Replit organization admin.
  • A Databricks account for every builder who will use the connector.
  • Workspace access for every builder, including Can use permission on the SQL Warehouse and the required Unity Catalog permissions.

Step 1: Create an OAuth app connection

You must be a Databricks account admin to complete this step.
The Databricks account admin registers Replit as an OAuth application. The app connection provides the client ID and client secret used to configure Replit.
1

Open the Databricks account console

In your Databricks workspace, open the workspace picker in the top-right corner and select Manage account.
Databricks workspace picker open with Manage account visible
2

Open App connections

In the account console, select Settings, then open the App connections tab.
Databricks account Settings page with the App connections tab selected and Add connection button visible
3

Configure the Replit connection

Select Add connection. Enter an application name that identifies Replit, such as replit-u2m.Under Redirect URLs, enter:
Under Access scopes, select All APIs. This allows Agent to use Databricks SQL and the Databricks APIs needed to build and manage Databricks Apps.Select Generate a client secret. Databricks cannot add a secret to this connection after it is created.Set the token lifetimes according to your organization’s security policy. The example uses Access token TTL 1440 minutes (24 hours) and Refresh token TTL 129600 minutes (90 days), the maximum values shown by Databricks. A shorter refresh token lifetime can require builders to sign in more often.Select Add.
All APIs grants broader access than SQL alone. Control the connector’s effective access with each builder’s Databricks permissions.
Databricks Add connection form configured with a Replit application name, redirect URL, All APIs access, client secret generation, and token lifetimes
4

Store the OAuth credentials

Copy the Client ID and Client Secret, then store them in your organization’s secret manager.
Databricks displays the client secret once. Record its expiration date and rotate the app connection before the secret expires.
Databricks Connection created dialog with the client ID and client secret redacted, plus the one-time-secret warning and expiration date
New or updated OAuth app connections can take up to 30 minutes to become available.

Step 2: Share the SQL Warehouse details

Each builder enters the SQL Warehouse details when authorizing the U2M connector. Publish these values somewhere your builders can access, such as an internal onboarding page.
1

Open SQL Warehouses

In the Databricks workspace, select SQL Warehouses and open the warehouse builders should use.
Databricks SQL Warehouses page showing available warehouses
2

Copy the connection details

Select Connection details, then copy the Server hostname and HTTP path.
Databricks SQL Warehouse connection details page with server hostname and HTTP path

Step 3: Enable U2M in Replit

You must be a Replit organization admin to configure connectors.
1

Open and enable the U2M connector

From your Replit account home, open Settings, then Integrations. Search for Databricks U2M, find Databricks for Databricks Apps (U2M), and select Enable.Enter the Client ID and Client Secret from the Databricks app connection.Confirm that the redirect URL shown in Replit matches the URL configured in Databricks:
Under Connector Scopes, enable all-apis and offline_access. The offline_access scope gives Replit a refresh token for long-lived sessions.Select Configure.
Replit Integrations settings filtered to Databricks U2M with the enable panel showing the redirect URL, OAuth credential fields, and connector scopes
2

Verify the connector is enabled

Confirm that Databricks for Databricks Apps (U2M) appears under Your integrations.

Step 4: Sign in as a builder

Each builder signs in with their own Databricks account before using the connector. Replit can refresh the session until the refresh token expires.
1

Sign in to the connector

On the Integrations page, find Databricks for Databricks Apps (U2M) and select Sign in. Review the connection details, then select Continue to Databricks for Databricks Apps.
Connect Databricks for Databricks Apps modal explaining the redirect, privacy, and permission controls
2

Enter the SQL Warehouse details

Enter the SQL Warehouse HTTP path provided by your Databricks admin, then select Next.
Connect Databricks for Databricks Apps dialog prompting for the SQL Warehouse HTTP path in step 1 of 2
Replit next asks for the SQL Warehouse Server hostname. Enter it and continue to Databricks. Sign in when prompted, review the requested access, and approve the request.Every query Agent runs through this connection uses your Databricks permissions and is attributed to you in Databricks audit logs.After approval, Databricks returns you to Replit and the connector is ready to use.

Set up the service principal connector

Service principal setup involves three roles:
  1. Databricks admin: creates the service principal and grants permissions in Databricks.
  2. Replit organization admin: configures the connector and access in Replit.
  3. Builder: starts building with the shared Databricks identity.

Service principal prerequisites

Before you start, confirm you have:
  • Databricks account admin or workspace admin access.
  • Replit organization admin access.

Step 1: Create a service principal in Databricks

You must be a Databricks account admin or workspace admin to complete this step.
The Databricks admin creates a machine-to-machine identity, called a service principal, that Replit uses to connect to Databricks.
1

Open Settings

In Databricks, select your avatar in the top-right corner, then select Settings.
Databricks workspace menu with Settings selected
2

Select Identity and access

In the Settings sidebar, select Identity and access.
Databricks Settings page with Identity and access in the sidebar
3

Manage service principals

Under Management and permissions, find Service principals and select Manage.
Identity and access settings page showing the Service principals Manage button
4

Add a new service principal

Select Add service principal, then select Add new.
Add service principal dialog with the Add new button
5

Name the service principal

Enter a clear name for the service principal, then select Add.
Add service principal dialog with a service principal name entered
6

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.
Databricks service principal details page
7

Grant access

Open the Permissions tab, select Grant access, choose the service principal, set the permission to Manage, then select Save.
Grant access dialog for a Databricks service principal with Manage permission selected

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

Open SQL Warehouses

In the Databricks sidebar, select SQL Warehouses.
Databricks SQL Warehouses page showing available warehouses
2

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

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.
Databricks SQL Warehouse connection details page with server hostname and HTTP path

Step 3: Create the Databricks connector in Replit

You must be a Replit organization admin to configure connectors.
The Replit admin adds the Databricks connection details to Replit so builders can use the connector.
1

Navigate to Integrations

From your Replit account home, open the Integrations page. Under Connectors, find Databricks (Service Principal) and select Sign in.
Replit Integrations page filtered to Databricks, showing the Databricks (Service Principal) connector with a Sign in button
2

Confirm the connection

Replit shows a confirmation dialog before redirecting to Databricks for authentication. Review the details and select Continue to Databricks.
Connect Databricks dialog explaining the OAuth redirect, data usage, and permissions
3

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.
Connect Databricks dialog step 1 of 2 prompting for the SQL Warehouse HTTP path
4

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.
Connect Databricks dialog step 2 of 2 prompting for the SQL Warehouse server hostname
5

Configure access

Use Role-Based Access Control to choose which members or groups in your organization can use this connector.
6

Verify the connector is active

Back on the Integrations page, confirm that Databricks (Service Principal) appears under Connectors with an Active connection status.
Replit Integrations page showing the Databricks (Service Principal) connector with an Active connection status

Build with Agent

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

Select the Databricks App template for deployment

Select the Databricks App template when you want to deploy the finished app to your Databricks environment. You do not need the template to use a configured connector to access Databricks data and assets.From the Replit home page, open the template selector and choose Databricks App.
Replit home page with the Databricks App template selected above the prompt box
2

Describe your application

Add your prompt after the prefilled instructions. For inspiration, browse the Databricks Dev Hub templates.
3

Review and iterate

Review the SQL Agent generates, the tables it queries, and the application structure. Ask for changes in natural language.

Troubleshooting

Check the Databricks permissions for the identity running the query. With U2M, this is the individual builder. With the service principal connector, it is the shared service principal. The identity may have metadata access but no read permission on the data. Grant the required catalog, schema, or table permissions and try again.
Verify that the Server hostname and HTTP path match the SQL Warehouse connection details in Databricks. For U2M, check the values entered by the affected builder. Also confirm that the warehouse is running and the query identity has permission to use it.
For U2M, confirm the Databricks app connection lists https://replit.com/connectors/oauth/callback under Redirect URLs, with no trailing slash. If authentication fails for every builder, verify the shared Client ID and Client Secret, confirm the secret has not expired, and make sure the scopes in Replit match the Databricks app connection.For the service principal connector, 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.
This can happen with U2M when the refresh token expires or is revoked. Complete the Databricks authorization flow again. If builders must reconnect more often than your security policy requires, review the app connection’s token lifetimes.