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

# Snowflake

> Connect Snowflake to your Atako agents — 6 read and 2 write actions.

Let your agents explore and query your Snowflake data warehouse — list databases, schemas and tables, describe columns, run read-only SELECT queries and, when allowed, execute SQL statements through the SQL API.

## Connection

* **Authentication**: API key (Programmatic access token).
* **Required settings**:
  * **Account identifier** — Account identifier in the organization-account format, lowercase (Admin → Accounts, or account selector → View account details). The legacy locator.region format (ab12345.eu-west-1) is not accepted.

<Note>
  In Snowsight: user menu (bottom-left) → Settings → Authentication → Programmatic access tokens → Generate new token (an admin can also do it for a service user: Governance & security → Users & roles → the user → Programmatic access tokens). Name it, restrict it to a role (a read-only role is recommended — it bounds everything the agents can do) and pick an expiration, then copy the token: it is shown only once. By default Snowflake only accepts a token from a user covered by a network policy: your admin may need to add one (or relax it through an authentication policy). Account identifier: account selector → View account details → the part of the account URL before .snowflakecomputing.com, in lowercase (e.g. myorg-myaccount).

  See [Snowflake's documentation](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens).
</Note>

## Read actions (6)

| Action                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `describe_table`       | Get the columns of a table or view from INFORMATION\_SCHEMA.COLUMNS (needs a warehouse — the user's default one unless warehouse is set): column\_name, data\_type, is\_nullable, column\_default, character\_maximum\_length, numeric\_precision, numeric\_scale, comment, in column order.                                                                                                                                                                                               |
| `get_statement_status` | Get the status of a statement by its statementHandle, and its rows once finished (200 = ResultSet with data; 202 = still running; 422 = failed). partition fetches another result partition listed in resultSetMetaData.partitionInfo (0 = first).                                                                                                                                                                                                                                         |
| `list_databases`       | List the databases visible to the token's role (SHOW DATABASES — no warehouse needed; takes no argument). Rows follow rowType: created\_on, name, is\_default, is\_current, origin, owner, comment…                                                                                                                                                                                                                                                                                        |
| `list_schemas`         | List the schemas of a database (SHOW SCHEMAS IN DATABASE — no warehouse needed). Rows follow rowType: created\_on, name, is\_default, is\_current, database\_name, owner, comment…                                                                                                                                                                                                                                                                                                         |
| `list_tables`          | List the tables and views of a schema from INFORMATION\_SCHEMA.TABLES (needs a warehouse — the user's default one unless warehouse is set). Columns: table\_name, table\_type, row\_count, bytes, created, last\_altered, comment; at most 1000 rows.                                                                                                                                                                                                                                      |
| `query`                | Run ONE read-only SELECT query (or WITH … SELECT) and return its rows — anything else is refused, use execute\_statement. Returns resultSetMetaData (numRows, rowType = columns \[\{name, type, nullable…}], partitionInfo) and data = rows as arrays of strings in rowType order (SQL NULL = null); when partitionInfo has several entries, fetch the others with get\_statement\_status (partition). A 202 answer means still running: poll get\_statement\_status with statementHandle. |

## Write actions (2)

| Action              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cancel_statement`  | Cancel a running statement by its statementHandle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `execute_statement` | Execute ONE SQL statement of any kind (INSERT, UPDATE, DELETE, MERGE, CREATE, SHOW, CALL…) — it can modify data, so prefer query for reads. PUT/GET file transfers are not supported by the SQL API, and USE, ALTER SESSION, BEGIN/COMMIT are not accepted as a single statement: pass database/schema/warehouse/role instead. Returns resultSetMetaData (numRows, rowType = columns \[\{name, type, nullable…}], partitionInfo) and data = rows as arrays of strings in rowType order (SQL NULL = null); when partitionInfo has several entries, fetch the others with get\_statement\_status (partition). A 202 answer means still running: poll get\_statement\_status with statementHandle. For DML, data holds the affected row counts. |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
