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

# Connecting Databricks to your app

> Run notebooks, execute SQL, and manage data pipelines in Databricks from your Base44 app.

Connect your Base44 app to Databricks to run notebooks, execute SQL, and manage data pipelines, then build dashboards, reports, and AI apps on top of your lakehouse data.

<Tip>
  **Databricks is a connector for app builders.** You connect it once with your own Databricks credentials at the workspace level, and your app queries Databricks through that connection. Each person using your app does not connect Databricks themselves.
</Tip>

<Note>
  You need a [**Builder plan**](https://base44.com/pricing) or higher to use connectors in your app.
</Note>

***

## What you can do

<CardGroup cols={3}>
  <Card title="Run notebooks and jobs" icon="play">
    Trigger Databricks notebooks and data pipeline jobs from your app.
  </Card>

  <Card title="Execute SQL" icon="database">
    Run SQL against your lakehouse and SQL warehouses, and surface the results in your app.
  </Card>

  <Card title="Build analytics dashboards" icon="chart-column">
    Turn Databricks queries into charts, tables, and dashboards your team can read.
  </Card>
</CardGroup>

**Example prompts for the AI chat**

```text theme={null}
Run a Databricks notebook to process today's data.
```

```text theme={null}
Execute a SQL query on my Databricks lakehouse.
```

```text theme={null}
Trigger a data pipeline job in Databricks.
```

```text theme={null}
Fetch results from a Databricks SQL warehouse.
```

***

## At a glance

<Card>
  <div className="b44-spec">
    <div className="b44-spec-row"><div className="b44-spec-key">Type identifier</div><div className="b44-spec-val"><code>databricks</code></div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Category</div><div className="b44-spec-val">Analytics</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Auth model</div><div className="b44-spec-val">OAuth, bring your own credentials</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Connector type</div><div className="b44-spec-val">For app builders (workspace-level)</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Connection config</div><div className="b44-spec-val">Databricks workspace URL (for example <code>[https://adb-123456789.10.azuredatabricks.net](https://adb-123456789.10.azuredatabricks.net)</code>), required</div></div>
  </div>
</Card>

***

## Connect it

Databricks is a connector for app builders. You connect it once at the workspace level with your own Databricks OAuth credentials, and it applies to all apps in that workspace.

<Check>
  Before you start, you need:

  * A **Databricks OAuth application** in your Databricks account, so you have a **Client ID** and **Client Secret**.
  * Your **Databricks workspace URL**, the full address starting with `https://` (for example `https://adb-123456789.10.azuredatabricks.net` or `https://your-workspace.cloud.databricks.com`).
</Check>

**To add Databricks from your workspace settings:**

1. Click your workspace name at the bottom left.
2. Click **Settings**.
3. Click **Connectors** under **Plugins**.
4. Under **Connectors For App Builders**, find **Databricks**.
5. Click **Add** next to the connector.
6. Add the redirect URI `https://app.base44.com/api/external-auth/callback` to your Databricks OAuth app.
7. Enter a **Connector name** to identify this connector.
8. Enter the **Client ID** and **Client Secret**. Leave **Additional scopes** empty.
9. Enter your **Databricks Workspace URL**.
10. Click **Add Connector**.

<Note>
  Your Databricks Workspace URL must start with `https://` and use a Databricks domain, for example `https://adb-123456789.10.azuredatabricks.net`.
</Note>

You can also set up Databricks from the AI chat in an app. Describe what you want to build, and when prompted, provide the same connector details. The connector is registered at the workspace level and becomes available across all apps in that workspace.

***

## Scopes

Databricks uses two scopes:

* `all-apis`
* `offline_access`

Both are included automatically when you add the connector, and appear under **Always included**. Register both on your Databricks OAuth app. Leave **Additional scopes** empty unless your app needs more.

***

## Use it in a backend function

Once Databricks is connected, your backend functions can retrieve an access token and query your workspace. Base44 handles the OAuth flow and credential storage.

```javascript theme={null}
const connection = await base44.asServiceRole.connectors.getConnection("databricks");
// Use the connection's access token to call the Databricks REST API.
```

This is a simplified example. For the full pattern, including how to read the connection details and structure the request, see the developer documentation:

<CardGroup cols={1}>
  <Card title="Connectors (developer docs)" icon="code" href="/developers/backend/resources/connectors">
    Retrieve a connection, read its details, and call the service API from a backend function.
  </Card>
</CardGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="I do not see Databricks in workspace settings">
    Confirm that you are working in the correct workspace and that you have permission to manage workspace connectors. If you still do not see Databricks, [contact support](/Community-and-support/Contacting-support).
  </Accordion>

  <Accordion title="My Databricks Workspace URL is not accepted">
    Enter a Databricks Workspace URL that starts with `https://` and uses a Databricks domain, for example `https://adb-123456789.10.azuredatabricks.net`.
  </Accordion>

  <Accordion title="The connection does not work after setup">
    Check that the redirect URI `https://app.base44.com/api/external-auth/callback` is added to your Databricks OAuth app. Then confirm that the Client ID, Client Secret, and Databricks Workspace URL are correct, and that both scopes are registered on your Databricks OAuth app.
  </Accordion>
</AccordionGroup>

***

## FAQs

<AccordionGroup>
  <Accordion title="Who can add the Databricks connector?">
    You need permission to manage workspace connectors.
  </Accordion>

  <Accordion title="Where do I find the Base44 redirect URI?">
    Databricks is a workspace-level connector, so it uses a single redirect URI: `https://app.base44.com/api/external-auth/callback`. Add it to your Databricks OAuth app. If you are setting the connector up from the AI chat, the setup form also shows it.
  </Accordion>

  <Accordion title="What should I enter for Databricks Workspace URL?">
    Enter your Databricks Workspace URL. The URL must start with `https://` and use a Databricks domain, for example `https://adb-123456789.10.azuredatabricks.net`.
  </Accordion>

  <Accordion title="Can I add Databricks from the AI chat?">
    Yes. You can start from the AI chat in a specific app. If the connector is not set up yet, Base44 asks for the connector details before continuing.
  </Accordion>

  <Accordion title="Do people using my app need to connect Databricks themselves?">
    No. The Databricks connector is set up at the workspace level and can be used across apps created in that workspace.
  </Accordion>
</AccordionGroup>
