> 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/snowflake.md).

# Snowflake

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

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

## Overview

Run SQL queries and statements against your Snowflake warehouse directly from an <code class="expression">space.vars.automation</code> in <code class="expression">space.vars.Kizen\_company\_name</code> and use the results in later steps with the Snowflake integration.

### What Is the Snowflake Integration?

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

* **Read Data:** Runs a `SELECT` query against your Snowflake warehouse and returns the results to a variable
* **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 Snowflake once, as an integration secret in <code class="expression">space.vars.Kizen\_company\_name</code>. See [Enable Snowflake in Kizen](/docs/integrations-and-plugins/integrations/snowflake/enable-snowflake-in-kizen.md) for details.

The integration supports a single Snowflake 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 Snowflake Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/snowflake/add-snowflake-data-to-an-agentic-workflow.md).

### When to Use the Snowflake Integration

Use the Snowflake integration when an <code class="expression">space.vars.automation</code> needs to check or update data that lives outside <code class="expression">space.vars.Kizen\_company\_name</code> in a Snowflake warehouse 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 handles the communication with Snowflake.

#### Common Use Cases

* Surfacing a patient's utilization history across visits to flag care-gap risks before an appointment
* Aggregating a policyholder's claims history to calculate a risk score during renewal review
* Pulling a credit applicant's multi-year repayment and delinquency history to inform a portfolio risk model

***

## How the Snowflake Integration Works

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

### Connection Model

The integration uses Snowflake SQL API version 2 over HTTPS with Programmatic Access Token authentication to connect to Snowflake.

Connecting to Snowflake from <code class="expression">space.vars.Kizen\_company\_name</code> requires a Snowflake user or service account and a role with the necessary `USAGE` privileges as well as read or write privileges on the tables to query. But instead of using an authorization protocol like OAuth, the Snowflake integration keeps track of your connection credentials as an integration secret. A single secret can hold credentials to multiple Snowflake environments, such as production and staging, as separate keys. You select which environment to use at each Read Data or Write Data step of the <code class="expression">space.vars.automation</code>.

For more information, see [Add Snowflake Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/snowflake/add-snowflake-data-to-an-agentic-workflow.md).

### Query Execution

The integration doesn't use schema introspection. That is, it doesn't browse databases, schemas, or tables on your behalf. It runs the exact SQL statement you supply.

Queries and statements execute synchronously, so the <code class="expression">space.vars.automation</code> waits at the Read Data or Write Data step until the database returns the result. The step times out on the <code class="expression">space.vars.Kizen\_company\_name</code> side after 30 seconds.

### Rate Limiting

Rate limits are subject to your Snowflake server's maximum number of connections, per-role connection limits, and timeout setting.

If you exceed the rate limit, Snowflake replies with the HTTP 429 Too Many Requests status code, and the <code class="expression">space.vars.automation</code> step fails immediately. <code class="expression">space.vars.Kizen\_company\_name</code> doesn't retry the request.

For more information, see [Troubleshoot Snowflake](/docs/integrations-and-plugins/integrations/snowflake/troubleshoot-snowflake.md).

### Results Handling

Both the Read Data and Write Data steps include the Return Single Value input, which, when true, signifies that you expect to return exactly one row and one column from the database. The result comes back as a string. When false, the full result set comes 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.

Please also note the following:

* Results sets larger than 5 MB might be truncated. Use `LIMIT` in the query to narrow the results.
* A result with multiple rows isn't auto-paginated. If you need pages, use `LIMIT` and `OFFSET` in the query.
* A query that returns no rows returns an empty string, not the null value.

### Failure Handling

If a connection or query fails, for example because of invalid credentials, an unreachable database, or invalid SQL, the step fails immediately and results in an error message. <code class="expression">space.vars.Kizen\_company\_name</code> doesn't automatically retry a failed step, so after you correct the underlying issue, rerun the step manually.

For more information, see [Troubleshoot Snowflake](/docs/integrations-and-plugins/integrations/snowflake/troubleshoot-snowflake.md).

### Data Safety

If your <code class="expression">space.vars.automation</code> writes data to your database, 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 safety of your data, grant the role assigned to the connected user or service account the appropriate level of access to Snowflake data and operations. If you don't intend to write data, for example, a read-only role with `SELECT` privileges on the specific tables to read is sufficient. Avoid roles with broad `OWNERSHIP` on Snowflake databases, schemas, and tables.

***

## Available Snowflake Actions and Topics

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

* [Enable Snowflake in Kizen](/docs/integrations-and-plugins/integrations/snowflake/enable-snowflake-in-kizen.md)
* [Add Snowflake Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/snowflake/add-snowflake-data-to-an-agentic-workflow.md)
* [Troubleshoot Snowflake](/docs/integrations-and-plugins/integrations/snowflake/troubleshoot-snowflake.md)

***

## What's Next

Continue to [Enable Snowflake in Kizen](/docs/integrations-and-plugins/integrations/snowflake/enable-snowflake-in-kizen.md) to configure Snowflake to work with <code class="expression">space.vars.Kizen\_company\_name</code>, turn on the Snowflake integration, and enter your connection credentials as an integration secret.

<details>

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

* [Enable Snowflake in Kizen](/docs/integrations-and-plugins/integrations/snowflake/enable-snowflake-in-kizen.md)
* [Add Snowflake Data to an Agentic Workflow](/docs/integrations-and-plugins/integrations/snowflake/add-snowflake-data-to-an-agentic-workflow.md)
* [Troubleshoot Snowflake](/docs/integrations-and-plugins/integrations/snowflake/troubleshoot-snowflake.md)

</details>

***

*Snowflake and all other Snowflake product, feature, and service names mentioned herein are registered trademarks or trademarks of Snowflake Inc. in the United States and other countries. Kizen's Snowflake integration is not affiliated with, sponsored by, or endorsed by Snowflake Inc.*


---

# 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://developer.kizen.com/docs/integrations-and-plugins/integrations/snowflake.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.
