> 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-apps/integrations/databricks/add-databricks-data-to-an-agentic-workflow.md).

# Add Databricks Data to an Agentic Workflow

Add Read Data and Write Data actions to your Agentic Workflow in Kizen to query or update your external Databricks SQL Warehouse in real time.

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

**Purpose:** Explains how to read and write Databricks data from an <code class="expression">space.vars.automation</code> to query or update your SQL Warehouse
{% endhint %}

## Overview

{% hint style="warning" %}
**Caution:** This setup reflects Kizen's default configuration. Your administrator may have customized your layout, so columns or navigation may appear differently. Trial accounts may have limited features.
{% endhint %}

Once you configure your connection to Databricks, you can add Read Data and Write Data action steps to your <code class="expression">space.vars.automations</code> in <code class="expression">space.vars.Kizen\_company\_name</code> to query or update your Databricks SQL Warehouse in real time.

***

## Before You Begin

To add Databricks data to an <code class="expression">space.vars.automation</code>, you need an active Databricks connection. For details, see [Set Up Databricks in Kizen](/docs/integrations-and-apps/integrations/databricks/set-up-databricks-in-kizen.md).

***

## Add Databricks Data to an Agentic Workflow

To add Databricks data to an <code class="expression">space.vars.automation</code>:

{% stepper %}
{% step %}

#### Go to the Agentic Workflow builder

In the global navigation, select **Agentic Workflows**. Then, to open the builder, do one of the following:

* Select **New Agentic Workflow**.
* Select the name of an existing <code class="expression">space.vars.automation</code>.

<figure><img src="https://3898351136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQd8ufpN7wkdnx7JtgoeZ%2Fuploads%2FR8UQAcjdGWrFb0mxUV7N%2Fglobal_newagenticworkflow.png?alt=media&amp;token=6cda3094-7bdb-4d25-bec2-8a80e23c2482" alt="The New Agentic Workflow button on the Agentic Workflows page" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Add an action to the Agentic Workflow

In the builder, select **+**, and then select **Add Action**.

<div data-with-frame="true"><figure><img src="https://3898351136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQd8ufpN7wkdnx7JtgoeZ%2Fuploads%2FobTLCmx6vtRf9wOVr9ZF%2FScreenshot%202026-07-15%20at%209.29.55%E2%80%AFAM.png?alt=media&amp;token=d26141b7-da42-46db-bb0e-d34400d09eda" alt="The Add Action context menu item in the Agentic Workflow builder" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Select the Databricks Connection action

In the Add Action modal that appears, scroll to the Integration section, and select the Databricks Connection card.

<div data-with-frame="true"><figure><img src="https://3898351136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQd8ufpN7wkdnx7JtgoeZ%2Fuploads%2FtsaeFf4CFY57jg2GVzQw%2Fdatabricks_addaction.png?alt=media&amp;token=7d029d99-ee58-4032-84b5-3632dfc3ea04" alt="The Databricks Connection card on the Add Action modal" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Choose whether to read or write Databricks data

In the Actions Settings section of the Add Action modal, select the **Action** dropdown menu, and do one of the following:

* To read Databricks data, select **Read Data**.
* To write Databricks data, select **Write Data**.

<div data-with-frame="true"><figure><img src="https://3898351136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQd8ufpN7wkdnx7JtgoeZ%2Fuploads%2FYMexzdnh9WZyhoMx5bG9%2Fdatabricks_readdata.png?alt=media&amp;token=3f848afb-dd0e-4344-89df-2ba88281d89c" alt="The Read Data item of the Action menu under Action Settings in the Add Action modal" width="563"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
**Caution:** The Write Data action can insert, update, or delete data in your Databricks data warehouse. Validate your query in a non-production environment before running it against production data.
{% endhint %}
{% endstep %}

{% step %}

#### Configure the sources for the script inputs

For each of the fields in the Script Inputs section of the modal, select the source of the field's value from the **Input Source** dropdown menu, and then configure the source with the additional controls that appear.

<figure><img src="https://3898351136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQd8ufpN7wkdnx7JtgoeZ%2Fuploads%2FucOpp3ukU8qqRFGQOKDy%2Fdatabricks_readdata_inputs.png?alt=media&amp;token=9e6730be-92b4-4a51-b670-36b84b94d4ee" alt="The script inputs for the Read Data action in the Add Action modal" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** The order of the fields on the screen depends on whether you selected the Read Data or Write Data action.
{% endhint %}

The fields are as follows:

| Field                     | Type      | Description                                                                                                                                                                | Required?                                 |
| ------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **Connection Secret Tag** | `String`  | The name of the Databricks environment from your integration secret to execute the query on. Configure this source when you have more than one environment in your secret. | Not in a single-environment configuration |
| **Database**              | `String`  | The name of the Utility Catalog to query in Databricks.                                                                                                                    | Yes                                       |
| **Query**                 | `String`  | The `SELECT` statement to execute.                                                                                                                                         | Yes                                       |
| **Return Single Value**   | `Boolean` | Whether you expect to return a single value (`yes`) or multiple values (`no`).                                                                                             | Yes                                       |
| **Schema**                | `String`  | The name of the target schema within the specified Databricks Utility Catalog.                                                                                             | Yes                                       |

{% hint style="info" %}
**Note:** Always use the `LIMIT` clause in `SELECT` queries against large tables. Requests for more than 25 MB of data fail outright, with no partial or truncated results returned.
{% endhint %}
{% endstep %}

{% step %}

#### Configure the destinations for the script outputs

For each of the fields in the Script Outputs section of the modal, select the destination of the field's value from the **Output Destination** dropdown menu, and then configure the destination with the additional controls that appear.

<div data-with-frame="true"><figure><img src="https://3898351136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQd8ufpN7wkdnx7JtgoeZ%2Fuploads%2FI0pbth5kYlaiEvkIeuRr%2Fsnowflake_scriptoutputs_write.png?alt=media&amp;token=79b088d6-0a6b-4b33-b830-bb1879c221a6" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Note:** The Read Data action uses only the **Result** field as a script output. The Write Data action uses both **Result** and **Result Status**.
{% endhint %}

The fields are as follows:

| Field             | Type     | Action                | Description                            | Required? |
| ----------------- | -------- | --------------------- | -------------------------------------- | --------- |
| **Result**        | `String` | Read Data             | The result of the query                | No        |
| **Result Status** | `String` | Read Data, Write Data | The status of the Write Data operation | No        |
| {% endstep %}     |          |                       |                                        |           |

{% step %}

#### Configure error handling

In the Error Handling section of the modal, specify how to handle errors in this step of the <code class="expression">space.vars.automation</code>.
{% endstep %}

{% step %}

#### Save the Databricks Connection action

Select **Save**.
{% endstep %}
{% endstepper %}

***

## What's Next

Continue to [Troubleshoot Databricks](/docs/integrations-and-apps/integrations/databricks/troubleshoot-databricks.md) to learn how to fix common technical issues with the Databricks integration.

<details>

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

* [Databricks](/docs/integrations-and-apps/integrations/databricks.md)
* [Set Up Databricks in Kizen](/docs/integrations-and-apps/integrations/databricks/set-up-databricks-in-kizen.md)
* [Troubleshoot Databricks](/docs/integrations-and-apps/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-apps/integrations/databricks/add-databricks-data-to-an-agentic-workflow.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.
