> For the complete documentation index, see [llms.txt](https://developer.kizen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.kizen.com/docs/integrations-and-plugins/integrations/databricks.md).

# Databricks

Connect Databricks SQL Warehouses to Kizen. Automatically read and write live Databricks data and use this data in Agentic Workflows.

{% hint style="success" %}
**Audience:** Admins, Developers, Solution Architects

**Purpose:** Explains what the Databricks integration is, when to use it, and how it works within your <code class="expression">space.vars.automations</code>
{% endhint %}

## Overview

Connect Databricks to <code class="expression">space.vars.Kizen\_company\_name</code> with the Databricks integration. Run SQL queries and statements against a Databricks SQL Warehouse directly from an <code class="expression">space.vars.automation</code> and use the results in later steps of the automated process.

### What Is the Databricks Integration?

The Databricks integration adds two action steps to the <code class="expression">space.vars.automation</code> builder:

* **Read Data:** Runs a `SELECT` query against a Databricks SQL Warehouse and returns the results for use in <code class="expression">space.vars.Kizen\_company\_name</code>
* **Write Data:** Executes `INSERT`, `UPDATE`, or `DELETE` statements and returns the number of affected <code class="expression">space.vars.entities</code>

You configure the connection to Databricks once, as an integration secret in <code class="expression">space.vars.Kizen\_company\_name</code>. See [Set Up Databricks in Kizen](/docs/integrations-and-plugins/integrations/databricks/set-up-databricks-in-kizen.md) for details.

The integration supports a single Databricks environment or multiple environments, each with its own connection credentials. If you have more than one environment, you specify which to query when you call Read Data or Write Data from your <code class="expression">space.vars.automation</code>. To learn more, see [Add Databricks Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/databricks/add-databricks-data-to-an-agentic-workflow.md).

### When to Use the Databricks Integration

Use the Databricks integration when an <code class="expression">space.vars.automation</code> needs to check or update Databricks SQL Warehouse data before continuing to the next step. You don't need to copy the data into <code class="expression">space.vars.Kizen\_company\_name</code> first. The integration treats Databricks as an extension of <code class="expression">space.vars.Kizen\_company\_name</code> and handles the communication with the Databricks server.

#### Common Use Cases

Here are some common use cases of the Databricks integration:

* Pulling a customer's current usage or eligibility figures from a Databricks Unity Catalog table and deciding which branch of the <code class="expression">space.vars.automation</code> to follow on the basis of this information
* Writing the outcomes of an <code class="expression">space.vars.automation</code> into a Delta table in Databricks
* Pointing the same <code class="expression">space.vars.automation</code> at your development and production environments in Databricks without changing the underlying queries

***

## How the Databricks Integration Works

Before you configure the Databricks integration, it's important to understand how it functions at a conceptual level.

### Connection Model

Connecting to Databricks from <code class="expression">space.vars.Kizen\_company\_name</code> requires a Unity Catalog workspace and a SQL Warehouse. <code class="expression">space.vars.Kizen\_company\_name</code> stores your connection credentials to Databricks as an integration secret, which can hold the credentials for multiple Databricks environments, such as production and staging. Specify the environment in which to work at each Read Data or Write Data step of the <code class="expression">space.vars.automation</code>.

Because the integration doesn't utilize an authorization protocol like OAuth, you must obtain a Personal Access Token (PAT) through Databricks and include the PAT in the <code class="expression">space.vars.Kizen\_company\_name</code> secret. Your PAT must be configured for the Databricks SQL Warehouse that you want to use in <code class="expression">space.vars.Kizen\_company\_name</code>, and it must have `SELECT` and `MODIFY` grants to read and write data on the target Unity Catalog, schema, and table.

For more information, see [Set Up Databricks in Kizen](/docs/integrations-and-plugins/integrations/databricks/set-up-databricks-in-kizen.md).

### Network

No additional network configuration is required to use the integration. You don't need to set your firewall to allow inbound TCP traffic from a specific port, and you don't need to add <code class="expression">space.vars.Kizen\_company\_name</code>'s egress IP address to any Databricks allowlist. Access is governed entirely through your PAT and Unity Catalog permission grants.

### Query Execution

Queries and statements execute synchronously, so the <code class="expression">space.vars.automation</code> waits at the Read Data or Write Data step until Databricks returns the result. The step times out on the <code class="expression">space.vars.Kizen\_company\_name</code> side after 30 seconds and causes it to fail with a timeout error. <code class="expression">space.vars.Kizen\_company\_name</code> doesn't automatically retry the step.

### Rate Limiting

The integration uses Databricks' SQL Statement Execution API to send your queries to Databricks from <code class="expression">space.vars.Kizen\_company\_name</code>. Databricks hasn't published rate limits for this API. Instead, your SQL Warehouse's own concurrency and cluster size creates an effective throughput boundary. If your query overloads capacity, the API responds that the request failed, and your <code class="expression">space.vars.automation</code> fails at this step. <code class="expression">space.vars.Kizen\_company\_name</code> doesn't automatically retry the request.

### Results Handling

Both the Read Data and Write Data steps include the Return Single Value input flag, which, when `yes`, signifies that you expect to return exactly one row and one column from Databricks.

Set this flag to `no` to return multiple rows or columns. These come back as a single string in JSON format. To refer to the values of individual keys in later steps of the <code class="expression">space.vars.automation</code>, parse the JSON string in a Code step.

{% hint style="info" %}
**Note:** If you set Return Single Value to `yes` but your query returns multiple rows, <code class="expression">space.vars.Kizen\_company\_name</code> generates an error.
{% endhint %}

Please also note the following:

* Requests for results sets larger than 25 MB always fail. Use `LIMIT` in the query to narrow the results.
* A result with multiple rows isn't auto-paginated. If you need pages, use `LIMIT` in the query.
* A query that returns no rows returns an empty string, not the null value.

### Data Security

If your <code class="expression">space.vars.automation</code> writes data to your Databricks SQL Warehouse, be sure to validate its behavior thoroughly on non-production data first. You can't roll back a Write Data operation after it executes, and the operation might partially apply if an error occurs during execution.

To maximize the security of your data, grant the PAT the appropriate level of access to Databricks data and operations. If you don't intend to write data, for example, excluding the `MODIFY` grant is advised.

***

## How to Use the Databricks Integration

For step-by-step instructions on using the Databricks integration, see the following topics:

* [Set Up Databricks in Kizen](/docs/integrations-and-plugins/integrations/databricks/set-up-databricks-in-kizen.md)
* [Add Databricks Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/databricks/add-databricks-data-to-an-agentic-workflow.md)
* [Troubleshoot Databricks](/docs/integrations-and-plugins/integrations/databricks/troubleshoot-databricks.md)

***

## What's Next

Continue to [Set Up Databricks in Kizen](/docs/integrations-and-plugins/integrations/databricks/set-up-databricks-in-kizen.md) to configure the connection between Databricks and <code class="expression">space.vars.Kizen\_company\_name</code>.

<details>

<summary><strong>Related Topics</strong></summary>

* [Set Up Databricks in Kizen](/docs/integrations-and-plugins/integrations/databricks/set-up-databricks-in-kizen.md)
* [Add Databricks Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/databricks/add-databricks-data-to-an-agentic-workflow.md)
* [Troubleshoot Databricks](/docs/integrations-and-plugins/integrations/databricks/troubleshoot-databricks.md)

</details>

***

*Databricks and Unity Catalog are trademarks of Databricks, Inc. Delta Lake is a trademark of the Delta Lake project and its contributors. Kizen's Databricks integration is not affiliated with, sponsored by, or endorsed by Databricks, Inc. or the Delta Lake project.*


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.kizen.com/docs/integrations-and-plugins/integrations/databricks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
