> For the complete documentation index, see [llms.txt](https://docs.finout.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finout.io/billing-integrations/data-and-engineering-platforms/connect-to-databricks.md).

# Connect to Databricks

Connecting Databricks to Finout gives your team visibility into Databricks spend across all your workspaces, alongside your other cloud and SaaS costs. A single account-level connection covers every workspace automatically, with costs broken down by workspace, cluster, SQL warehouse, job, and pipeline - no manual DBU rate configuration required.

{% hint style="warning" %}
**Note for accounts with multiple workspaces**

By following the steps below and giving Finout access to a Unity Catalog-enabled workspace, the costs reported in Finout will cover your whole account.

You don't have to repeat this setup for multiple workspaces under the same account.
{% endhint %}

With this integration you can:

* Track Databricks spend alongside your other cloud and SaaS costs in a single view
* Break down costs by workspace, cluster, SQL warehouse, job, and pipeline
* Use [Virtual Tags](https://docs.finout.io/user-guide/inform/virtual-tags) that include Databricks dimensions to allocate costs by team, project, or environment
* Use [Shared Cost Reallocation](https://docs.finout.io/user-guide/inform/shared-cost-reallocation) to distribute shared cluster or warehouse costs across teams
* Include Databricks cost data in custom [Dashboards](https://docs.finout.io/user-guide/inform/dashboards), [Anomalies](https://docs.finout.io/user-guide/optimize/anomalies), and financial plans

{% hint style="info" %}
Finout uses read-only access to Databricks system tables and does not modify or delete any of your data. Queries consume Databricks compute credits (DBUs).
{% endhint %}

***

### Prerequisites

Before connecting, make sure you have:

* A Databricks account with account admin privileges
* Unity Catalog enabled on any workspace — see the Databricks documentation for [AWS](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/), [Azure](https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/manage-privileges), or [GCP](https://docs.databricks.com/gcp/en/data-governance/unity-catalog/manage-privileges/)
* Metastore owner status for the Unity Catalog-enabled workspace

***

### 1. Set up in Databricks

#### Step 1 — Collect your Account ID and Workspace URL

1. **Log in** to the Databricks account console.
2. **Click** your avatar in the top right and copy your **Databricks Account ID** — save this for the steps below.

   <img src="/files/MVFtAHA4X1jffWM52hlS" alt="" height="121" width="512">
3. **Click** **Workspaces** and select a Unity Catalog-enabled workspace.
4. **Copy** your **Workspace URL** — save this for the steps below. Then open the workspace.<br>

   <img src="/files/Ncnba82mSNBUYvKJVcWK" alt="" height="229" width="624">

***

#### Step 2 — Create a service principal

1. **Click** your avatar in the top right of the workspace and select **Settings**.
2. Under **Workspace admin**, select **Identity and access**.
3. Next to **Service principals**, click **Manage**.<br>

   <img src="/files/NAU41N7sImRY8bNwJUxn" alt="" height="164" width="512">
4. **Click** **Add service principal** > **Add new**.
5. For **Service principal name**, enter `finout-billing-serviceprincipal`, then click **Add**.<br>

   <img src="/files/9W1yTlaq549TB6aoUcZV" alt="" height="211" width="556">
6. **Open** the newly created service principal and select the **Secrets** tab.
7. **Click** **Generate secret**.
8. Set a **Lifetime** of `730` days, then click **Generate**.<br>

   <img src="/files/Rjsq4xXPzSBKT2oVE0dw" alt="" height="196" width="441">

{% hint style="warning" %}
When the secret expires after 730 days, you will need to generate a new one and update the integration in Finout.
{% endhint %}

9. **Copy** both the **Client Secret** and **Client ID** — save these for the Finout connection.<br>

   <img src="/files/YqdA1PSTvRn1Hyb0YoJv" alt="" height="333" width="512">

***

#### Step 3 — Create a SQL warehouse

1. From the left navigation, under **SQL**, click **SQL Warehouses**.
2. **Click** **Create SQL warehouse** and enter the following:

| Field        | Value                      |
| ------------ | -------------------------- |
| Name         | `finout-billing-warehouse` |
| Cluster size | `2X-Small`                 |
| Type         | `Serverless`               |

<img src="/files/T7i1K5QlUCbXjjtChMFY" alt="" height="233" width="460">

3. **Click** **Create**.
4. In the **Manage permissions** modal which opens next, search for and select `finout-billing-serviceprincipal`.
5. Set the permission to **Can Use** and click **Add**.<br>

   <img src="/files/v57pGdUVnMOnwqIS5s16" alt="" height="193" width="624">
6. **Close** the modal and copy the **Warehouse ID** displayed next to the warehouse name — save this for the connection with Finout.<br>

   <img src="/files/3z3ghJfozB32GOvbhw5J" alt="" height="300" width="624">

***

#### Step 4 — Grant data reader permissions

1. From the top of the left navigation, click **Catalog**.
2. Expand **My Organization > system**.
3. For each of the following schemas, select the schema, click **Permissions > Grant**, add `finout-billing-serviceprincipal` as the principal, set **Privilege presets** to **Data Reader**, and click **Confirm**:
   * `system.access`
   * `system.billing`
   * `system.compute`

<img src="/files/dLdLC5S04glBdPOLDYPn" alt="" height="277" width="377">

***

### 2. Connect Databricks to Finout

1. In Finout, **navigate to** **Settings > Cost Centers**.<br>

   <figure><img src="/files/oXDbRk6vnMPRHhj7K7WI" alt=""><figcaption></figcaption></figure>
2. **Click** **Add Cost Center** and select **Databricks**. The **Connect Databricks** wizard opens.

<figure><img src="/files/2spgMBXcS37jI15rSb3x" alt=""><figcaption></figcaption></figure>

3. **Enter** the following details:

<table><thead><tr><th width="282.21875">Field</th><th>Description</th></tr></thead><tbody><tr><td>Cost Center Name</td><td>A name for this Cost Center in Finout</td></tr><tr><td>Service Principal Client ID</td><td>Client ID of the service principal created in Databricks</td></tr><tr><td>Service Principal Client Secret</td><td>Client secret generated in Databricks</td></tr><tr><td>Account Workspace URL</td><td>Workspace URL collected in Databricks (e.g. <code>acme-inc.cloud.databricks.com</code>)<br><br>Make sure to remove your URL schema (e.g. https://) and any query params or paths following the top level domain (any ?xxx or /xxx after .com, .net etc.)</td></tr></tbody></table>

4. **Click** **Next**. Finout validates your credentials, warehouse access, and permissions on all required system tables. If validation fails, an error message identifies the specific issue to fix.

**Result:** Your Databricks Cost Center is created, and data should be available within 24 hours.

***

Still need help? Reach out to our team at <support@finout.io>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.finout.io/billing-integrations/data-and-engineering-platforms/connect-to-databricks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
