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

# Databricks integration

> Connect Databricks to End Close through Fivetran and sync rows from a Databricks table into a data stream you can reconcile.

The Databricks integration syncs rows from a Databricks table into an End Close [data stream](https://endclose.com/docs/concepts/data-streams.md), with each row becoming one record. End Close connects through Fivetran: you enter your Databricks connection details in Fivetran's setup form, then choose the table and map its columns to record fields in End Close.

## At a glance

| | |
| - | - |
| **Connects as** | A Fivetran connection to your Databricks workspace |
| **Data synced** | Rows from one table per stream, as records |
| **Who can set it up** | Admins |
| **Per environment** | Yes. Each End Close environment has its own Databricks connection. |

## Prerequisites

* An End Close admin.
* Databricks connection details for a user that can read the tables you want to sync.
* A table with a column that uniquely identifies each row, such as a transaction ID, and columns for the amount, the date and the direction (credit or debit).

## Connect Databricks

**1. Open Databricks in End Close**

Go to **Settings → Integrations** and choose **Databricks** under **Data warehouses**.

**2. Enter the connection details in Fivetran**

Choose **Connect**. End Close sends you to a Fivetran setup form. Enter your Databricks connection details there and finish the form. The credentials go to Fivetran; End Close doesn't store them.

**3. Return to End Close**

Fivetran sends you back to End Close, and the Databricks dialog shows **Connected**.

If you leave the Fivetran form before finishing, the dialog shows **Action needed**. Choose **Finish setup** to return to the form.

## Create a Databricks stream

Each stream reads one table. Create one stream per table you reconcile.

**1. Start a new stream**

In the Databricks dialog, choose **New Databricks stream**. You can also start from **Data**.

**2. Choose data**

Under **Builder**, pick the table from **Table**. Then set the **Sync Key**: the column that uniquely identifies each row. End Close stores it as the record's `external_id`.

**3. Map columns**

Map a column to each required record field: **Amount**, **Date** and **Direction**. You can also map a column to **Description**. Choose **Continue** when the required fields are mapped.

**4. Name and save**

Enter a **Key** (for example `production_databricks`), a **Name** and, optionally, a **Description**, then choose **Create stream**. The key is used in URLs and the API, and can't be changed later.

End Close then sets up the Fivetran sync for the table, and rows arrive in the stream as Fivetran delivers them.

## FAQ

> [accordion] Can I sync the result of a SQL query instead of a table?
>
> Not yet. The **SQL** option in **Choose data** isn't available, so each stream reads a table. To sync a filtered or joined result, create a view in Databricks and pick that.

> [accordion] Can I sync several tables?
>
> Yes. Create one stream per table. They all use the same Databricks connection.

## Related

> [card] [Data streams](https://endclose.com/docs/concepts/data-streams.md)
>
> How streams hold records and feed reconciliations.

> [card] [Records](https://endclose.com/docs/concepts/records.md)
>
> The record fields your columns map to.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.