# Databricks

{% hint style="info" %}
Databricks OAuth connections require Spice.ai v1.4.0 or higher.
{% endhint %}

### Create Databricks App Connection

To connect Spice Cloud to your Databricks workspace, create a new App connection in your workspace settings with the following configuration:

* **Application Name**: `Spice Cloud Platform`
* **Redirect URLs**: `https://spice.ai/api/integrations/databricks/callback`&#x20;
* **Access scopes**: `All Apis`
* **Client secret generation:** `disabled`

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2Fgit-blob-a3edef95d112c95d686c6480520b52b1bdde9c21%2Fdatabricks-add-connection.png?alt=media" alt=""><figcaption><p>Add new Databricks OAuth connection</p></figcaption></figure>

After creating the connection, copy the generated OAuth client ID:

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2Fgit-blob-d86c3b6bf7b1e105740bf975f8a7ff8f613c6581%2Fdatabricks-connection-client-id.png?alt=media" alt=""><figcaption><p>Copy Databricks Client ID</p></figcaption></figure>

### Configure Databricks Connection in Spice Cloud

Navigate to the code editor and select the Databricks connector. Choose either SQL Warehouse or Delta Lake mode, then select the OAuth authorization option. Click **Connect Databricks Workspace** to proceed.

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2Fgit-blob-b7aa1ae5ce6b726876b909af99a747178a9f2d34%2Fspicepod-editor.png?alt=media" alt=""><figcaption><p>Databricks connector in code editor</p></figcaption></figure>

Enter the workspace URL and OAuth Client ID generated from the Databricks OAuth app, then click **Connect**.

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2Fgit-blob-60338be9c3acaa1334d7e95211563a6e8fbed1aa%2Fnew-databricks-connection.png?alt=media" alt=""><figcaption><p>Set Databricks workspace URL and Client ID</p></figcaption></figure>

After successful authentication in Databricks, you will be redirected back to the Spice app:

{% hint style="info" %}
Note: Databricks authentication credentials are only stored client-side in your browser and never in Spice Cloud.
{% endhint %}

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2Fgit-blob-616a4629bf5accdff443269ea0cc8b8f75b18e85%2Fconnection-success.png?alt=media" alt=""><figcaption><p>Successful connection</p></figcaption></figure>

Once connected, Databricks datasets, catalogs, and models can use the connection:

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2Fgit-blob-492172e3a4b46cccdc9719b4518528c77bea4fdc%2Fspicepod-editor-dataset.png?alt=media" alt=""><figcaption><p>Code editor with Databricks catalog, dataset and model</p></figcaption></figure>
