# Connecting to Databricks

This guide provides a step-by-step process to connect Databricks with Tellius. You’ll learn how to retrieve the necessary JDBC URL and Personal Access Token from the Databricks Cloud Console and use these credentials to establish a secure connection within Tellius.

### **Prerequisites**

1. Access to the Databricks Cloud Console ([https://dbc-xxxxxxx.cloud.databricks.com](https://dbc-xxxxxxx.cloud.databricks.com/))
2. Access to Tellius platform

### **Steps to be followed from Databrick Cloud Console**

1. Visit the Databricks Cloud Console at [https://dbc-xxxxxxx.cloud.databricks.com](https://dbc-xxxxxxx.cloud.databricks.com/) and log in with your credentials.
2. Once logged in, navigate to **SQL** module in Databricks Cloud.

<figure><img src="https://content.gitbook.com/content/8GaK1h3pmgbR63x0ftET/blobs/9DRJoMtW6mCfROQDe4Sy/image.png" alt="" width="563"><figcaption><p>Databricks -> SQL</p></figcaption></figure>

3. In the left menu, select **SQL Warehouses** and choose the required warehouse.

<figure><img src="https://content.gitbook.com/content/8GaK1h3pmgbR63x0ftET/blobs/UiQpOJLmeBBrWY7AmhGx/image.png" alt="" width="563"><figcaption><p>SQL warehouses</p></figcaption></figure>

4. Copy the JDBC URL provided on the warehouse details page. The URL should be in the following format:

```bash
jdbc:spark://dbc-xxxxxx.cloud.databricks.com:443/<DatabaseName>;transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/1.0/warehouses/xxxxxx;
```

{% hint style="info" %}
Please make sure to replace `<DatabaseName>` with the database name from which you are trying to load the data.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/8GaK1h3pmgbR63x0ftET/blobs/KDM5Gw5I0J9ReJ2FPzHc/image.png" alt="" width="563"><figcaption><p>Starter warehouse</p></figcaption></figure>

5. In the bottom right corner of the Databricks Cloud Console, click on the user icon and choose **User Settings**.
6. Create a new Personal Access Token by clicking **Generate New Token**.
7. Set an appropriate token name and validity, then click on **Generate**. Copy the generated token.

<figure><img src="https://content.gitbook.com/content/8GaK1h3pmgbR63x0ftET/blobs/hbeqmY8HcL98QjypNSKD/image.png" alt="" width="563"><figcaption><p>Generating token</p></figcaption></figure>

8. Update the JDBC URL by adding the Personal Access Token to it. Replace `<PersonalAccessToken>` with the token you copied in the previous step. The final JDBC URL should look like this:

```bash
jdbc:spark://dbc-xxxxxx.cloud.databricks.com:443/<DatabaseName>;transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/1.0/warehouses/xxxxxx;UID=token;PWD=<PersonalAccessToken>
```

### **Steps to be followed from Tellius**

1. Log in to the Tellius platform and navigate to **Data -> Connect -> Create New -> Databricks Delta Lake.**

<figure><img src="https://content.gitbook.com/content/8GaK1h3pmgbR63x0ftET/blobs/3Yxw9bJbRlVByP6p9qKK/image.png" alt="" width="563"><figcaption><p>Databricks on Tellius</p></figcaption></figure>

2. Enable the toggle **Use validated datasource connection details** to select from an already established connection. Choose the required datasource in **Select Datasource**.
3. Provide the updated JDBC URL from step 8 in the **URL** field.
4. Provide a relevant **Datasource Name** and click on **Save and browse host** or **Update and browse host**.
