> For the complete documentation index, see [llms.txt](https://docs.kognitos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kognitos.com/legacy/legacy-experience/books/reference/snowflake.md).

# Snowflake

Procedures and concepts for the Snowflake integration.

{% hint style="info" %}
The following documentation is for **Snowflake v3.4.0** *(BDK)*.
{% endhint %}

## Overview

Snowflake is a cloud-based data platform that provides data warehousing, data lakes, data engineering, and data science capabilities. This integration enables automated data loading, query execution, data transformation, and analytics workflows within Snowflake's cloud architecture.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Snowflake**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

### Connect using Account ID, Username and Password

Connect to a Snowflake database using the provided connection parameters.

| Label      | Description                                           | Type        |
| ---------- | ----------------------------------------------------- | ----------- |
| Account ID | Id of the Snowflake account (e.g. "ABCDEFG-ABC12345") | `text`      |
| Username   | Username of the Snowflake account                     | `text`      |
| Password   | Password of the Snowflake account                     | `sensitive` |

### Connect using Account ID, Username and Private Key

Connect to a Snowflake database using key pair authentication.

| Label       | Description                                           | Type        |
| ----------- | ----------------------------------------------------- | ----------- |
| Account ID  | Id of the Snowflake account (e.g. "ABCDEFG-ABC12345") | `text`      |
| Username    | Username of the Snowflake account                     | `text`      |
| Private Key | PEM-encoded private key (must be unencrypted)         | `sensitive` |

### Connect using Account ID, Username, Private Key and Private Key Passphrase

Connect to a Snowflake database using key pair authentication with a passphrase-protected key.

| Label                  | Description                                           | Type        |
| ---------------------- | ----------------------------------------------------- | ----------- |
| Account ID             | Id of the Snowflake account (e.g. "ABCDEFG-ABC12345") | `text`      |
| Username               | Username of the Snowflake account                     | `text`      |
| Private Key            | PEM-encoded private key (passphrase-protected)        | `sensitive` |
| Private Key Passphrase | Passphrase for the private key                        | `sensitive` |

### Connect using Account ID, Username and Token

Connect to a Snowflake database using a Programmatic Access Token.

| Label      | Description                                           | Type        |
| ---------- | ----------------------------------------------------- | ----------- |
| Account ID | Id of the Snowflake account (e.g. "ABCDEFG-ABC12345") | `text`      |
| Username   | Username of the Snowflake account                     | `text`      |
| Token      | Programmatic Access Token                             | `sensitive` |

### Configuration

The following table details all the available configuration options for this book.

| Concept         | Description                                                                            | Type   | Default Value |
| --------------- | -------------------------------------------------------------------------------------- | ------ | ------------- |
| `warehouse`     | Snowflake warehouse for compute.                                                       | `text` | (no default)  |
| `database name` | Database to scope discovery to. When set, only tables in this database are discovered. | `text` | (no default)  |
| `schema name`   | Schema to scope discovery to. Requires database name to also be set.                   | `text` | (no default)  |

Configuration can be set or retrieved as shown in the following examples:
