> ## 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

> Connect Base44 to your Databricks workspace to query data and build analytics and AI apps.

Connect your Base44 app to Databricks to query your workspace and build dashboards, reports, and data and AI apps on top of your Databricks 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="Query workspace data" icon="database">
    Run queries against your Databricks workspace 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>

  <Card title="Trigger on data changes" icon="bell">
    Combine Databricks with other connectors, for example alert a Slack channel when a metric drops.
  </Card>
</CardGroup>

**Example prompts for the AI chat**

```text theme={null}
Query Databricks to show product usage trends and display them as a dashboard.
```

```text theme={null}
Build a report from my Databricks workspace that summarizes revenue by team.
```

***

## 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">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 top left.
2. Click **Settings**.
3. Under **Integrations** in the left sidebar, click **Connectors**.
4. Under **Connectors For App Builders**, find **Databricks**.
5. Click **Add** next to the connector.
6. Click **View redirect URIs**, then add the redirect URI shown in Base44 to your Databricks OAuth app: `https://app.base44.com/api/external-auth/callback`
7. Enter the **Client ID**, **Client Secret**, and the **Scopes** your app needs. (`all-apis` and `offline_access` are always included.)
8. Enter your **Databricks Workspace URL**.
9. 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.

***

## 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 URIs shown in Base44 are added to your Databricks OAuth app. Then confirm that the Client ID, Client Secret, Scopes, and Databricks Workspace URL are correct.
  </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 URIs?">
    Click **View redirect URIs** in the connector setup form. Add the redirect URIs shown in Base44 to your Databricks OAuth app.
  </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>
