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

# Databricks Lakehouse

## 🐕‍🦺 Setup guide

Zenskar's Databricks data-source connector syncs data with [Delta Lake](https://delta.io/) on Databricks Lakehouse. Each stream is written to its own Delta table.

> 🚧 Note
>
> You **must** use [Unity Catalog](https://www.databricks.com/product/unity-catalog) to use this connector.

### ⚙️ Step 1: set up data source and type

1. Log into your Zenskar account.
2. In the left navigation bar, click **Metering** > **Data Sources**.
3. In the top-right corner, click **+ ADD DATA SOURCE**.
4. In the **Set Up Source** section of the **Add New Data Source** page, enter a name for the Databricks data source connection.
5. Select **Databricks** from the **Source Type** drop-down menu.

<Image align="center" border="true" src="https://files.readme.io/b097f7eb89605c0a3b210cc27cba01601297435de485985e9f2ce13bd430388c-image.png" className="border" />

### ⚙️ Step 2: configure data source

In the **Source Config** section of the **Add New Data Source** page, fill in the following details:

* **Databricks Access Token**: refer the [Databricks authentication](https://www.zenskar.com/docs/databricks-lakehouse#databricks-authentication) section.
* **Workspace Hostname**: the hostname of the [Databricks workspace](https://docs.databricks.com/en/admin/workspace/index.html). Refer the Section [Retrieve Databricks workspace details](https://www.zenskar.com/docs/databricks-lakehouse#retrieve-databricks-workspace-details) section.

> A workspace is a Databricks deployment in a cloud service account. It provides a unified environment for working with Databricks assets for a specified set of users.

* **Port Number**: refer the [Retrieve Databricks workspace details](https://www.zenskar.com/docs/databricks-lakehouse#retrieve-databricks-workspace-details) section.
* **HTTP Path**: refer the [Retrieve Databricks workspace details](https://www.zenskar.com/docs/databricks-lakehouse#retrieve-databricks-workspace-details) section.

<Image align="center" border="true" src="https://files.readme.io/71803fd1206c9d11a2dcbe418871ca13bfab2180455725a7c6ad7e9f8112967e-image.png" className="border" />

## Retrieve Databricks workspace details

1. Open the workspace console.
2. Open your SQL warehouse:

<Image align="center" border="true" src="https://files.readme.io/c255a8abefaae830eecd69008774fbec8b5a602618a41fece14acf9b2452988e-databricks-open-sql-warehouse.png" className="border" />

3. Open the **Connection Details** tab:

<Image align="center" border="true" src="https://files.readme.io/44ee591d474bb84c603136538bc26a5ec63f108b984ed57e8933860435b28ccd-databricks-open-sql-warehouse-connection-dtails.png" className="border" />

### Databricks authentication

#### Generate access token

1. Open your workspace console.
2. Click on the named drop-down menu at the top-right corner, and click on **Settings** option.
3. Navigate to **User Settings** > **Developer**, and click on **Generate new token**, as shown below.

<Image align="center" border="true" src="https://files.readme.io/1967eddca7218d4de940716ccd9da8026fe91edb5b5cb35959a79c002a2ff328-dtabricks-token-user-new.png" className="border" />

4. Enter a description for the token and its lifetime. You can leave blank **Lifetime (days)** blank for a permanent token:

<Image align="center" border="true" src="https://files.readme.io/2ae41a69a05349f85b4810b51d92302c5cce3a1890b97317301e77d18074a8d1-dtabricks-generate-token.png" className="border" />

<br />
