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

# Snowflake

> Reference for the Tracecat Snowflake integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Cancel SQL statement

Action ID: `tools.snowflake.cancel_statement`

Cancel execution of a Snowflake SQL statement.

Reference: [https://docs.snowflake.com/en/developer-guide/sql-api/reference#post-apiv2statementsstatementhandlecancel](https://docs.snowflake.com/en/developer-guide/sql-api/reference#post-apiv2statementsstatementhandlecancel)

### Secrets

Optional secrets:

* `snowflake_oauth`: OAuth token `SNOWFLAKE_USER_TOKEN`.
* `snowflake_oauth`: OAuth token `SNOWFLAKE_SERVICE_TOKEN`.
* `snowflake`: required values `SNOWFLAKE_OAUTH_CLIENT_ID`, `SNOWFLAKE_OAUTH_CLIENT_SECRET`, `SNOWFLAKE_OAUTH_TOKEN_URL`; optional values `SNOWFLAKE_OAUTH_SCOPE`, `SNOWFLAKE_OAUTH_AUDIENCE`, `SNOWFLAKE_OAUTH_TOKEN_ENDPOINT_AUTH_METHOD`.

### Input fields

<ParamField path="statementHandle" type="string" required>
  Handle of the statement to cancel.
</ParamField>

<ParamField path="base_url" type="string | null">
  Snowflake account URL, for example [https://org-account.snowflakecomputing.com](https://org-account.snowflakecomputing.com).

  Default: `null`.
</ParamField>

<ParamField path="requestId" type="string | null">
  Unique UUID for the API request.

  Default: `null`.
</ParamField>

## Execute SQL statement

Action ID: `tools.snowflake.execute_statement`

Submit one or more Snowflake SQL statements for execution.

Reference: [https://docs.snowflake.com/en/developer-guide/sql-api/reference#post-apiv2statements](https://docs.snowflake.com/en/developer-guide/sql-api/reference#post-apiv2statements)

### Secrets

Optional secrets:

* `snowflake_oauth`: OAuth token `SNOWFLAKE_USER_TOKEN`.
* `snowflake_oauth`: OAuth token `SNOWFLAKE_SERVICE_TOKEN`.
* `snowflake`: required values `SNOWFLAKE_OAUTH_CLIENT_ID`, `SNOWFLAKE_OAUTH_CLIENT_SECRET`, `SNOWFLAKE_OAUTH_TOKEN_URL`; optional values `SNOWFLAKE_OAUTH_SCOPE`, `SNOWFLAKE_OAUTH_AUDIENCE`, `SNOWFLAKE_OAUTH_TOKEN_ENDPOINT_AUTH_METHOD`.

### Input fields

<ParamField path="payload" type="object" required>
  SQL API request body. Documented fields are statement, timeout, database, schema, warehouse, role, bindings, and parameters.
</ParamField>

<ParamField path="async" type="boolean | null">
  Execute asynchronously and return the statement handle.

  Default: `null`.
</ParamField>

<ParamField path="base_url" type="string | null">
  Snowflake account URL, for example [https://org-account.snowflakecomputing.com](https://org-account.snowflakecomputing.com).

  Default: `null`.
</ParamField>

<ParamField path="nullable" type="boolean | null">
  Set false to return SQL NULL as the string "null".

  Default: `null`.
</ParamField>

<ParamField path="requestId" type="string | null">
  Unique UUID for the API request.

  Default: `null`.
</ParamField>

<ParamField path="retry" type="boolean | null">
  Set true with the same requestId when resubmitting a request.

  Default: `null`.
</ParamField>

## Get SQL statement

Action ID: `tools.snowflake.get_statement`

Check statement status or retrieve a result partition.

Reference: [https://docs.snowflake.com/en/developer-guide/sql-api/reference#get-apiv2statementsstatementhandle](https://docs.snowflake.com/en/developer-guide/sql-api/reference#get-apiv2statementsstatementhandle)

### Secrets

Optional secrets:

* `snowflake_oauth`: OAuth token `SNOWFLAKE_USER_TOKEN`.
* `snowflake_oauth`: OAuth token `SNOWFLAKE_SERVICE_TOKEN`.
* `snowflake`: required values `SNOWFLAKE_OAUTH_CLIENT_ID`, `SNOWFLAKE_OAUTH_CLIENT_SECRET`, `SNOWFLAKE_OAUTH_TOKEN_URL`; optional values `SNOWFLAKE_OAUTH_SCOPE`, `SNOWFLAKE_OAUTH_AUDIENCE`, `SNOWFLAKE_OAUTH_TOKEN_ENDPOINT_AUTH_METHOD`.

### Input fields

<ParamField path="statementHandle" type="string" required>
  Handle of the statement to check.
</ParamField>

<ParamField path="base_url" type="string | null">
  Snowflake account URL, for example [https://org-account.snowflakecomputing.com](https://org-account.snowflakecomputing.com).

  Default: `null`.
</ParamField>

<ParamField path="partition" type="integer | null">
  Partition number to return.

  Default: `null`.
</ParamField>

<ParamField path="requestId" type="string | null">
  Unique UUID for the API request.

  Default: `null`.
</ParamField>
