# Snowflake (/integrations/snowflake)

[Snowflake](https://www.snowflake.com/) stores data in databases and schemas and uses virtual warehouses to run queries. Sim connects over the SQL API with a programmatic access token.

Use the block to execute SQL, synchronize rows, move staged data, manage warehouses and tasks, and inspect history. To unload a query result, first materialize it as a view or with `CREATE TABLE AS SELECT`.

**Cortex Analyst.** Ask Cortex Analyst turns a plain-English question into SQL against a semantic view or semantic model, and can run that SQL to return rows. Pass the returned `conversation` back as history to ask follow-up questions, and start a new conversation after a handful of turns, since Snowflake reprocesses the whole history on every question. Before you use it:

- The access token's role needs the `SNOWFLAKE.CORTEX_USER` or `SNOWFLAKE.CORTEX_ANALYST_USER` database role, `SELECT` on the tables behind the semantic view, and read access to the stage when the model is a staged YAML file.
- Cortex Analyst always answers under the access token's role. The block's execution role, warehouse, and row limit apply only when it runs the generated SQL.
- Cortex Analyst runs natively in a limited set of cloud regions. Other accounts need cross-region inference turned on.
- Snowflake bills each successful answer, and running the SQL uses warehouse credits on top.
- Snowflake now recommends Cortex Agents for new builds; Cortex Analyst remains available.

Connection guides: [Programmatic access tokens](/integrations/snowflake-service-account).

## Use the block \[#usage-instructions]

Connect with a Snowflake programmatic access token to execute SQL, synchronize structured rows, load and unload staged data, browse databases and schemas, size and control warehouses, run and schedule tasks, review query and load history, inspect schemas, and call stored procedures. Ask Cortex Analyst questions in natural language against a semantic view or model to get generated SQL and, optionally, its results, with multi-turn follow-ups.

## Actions \[#actions]

### Snowflake Execute SQL \[#snowflake-execute-sql]

Execute one parameterized SQL statement through the Snowflake SQL API.

#### Input \[#input]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `database` | string | No | Database context for this statement |
| `schema` | string | No | Schema context for this statement |
| `statement` | string | Yes | One Snowflake SQL statement to execute |
| `bindings` | json | No | Snowflake bindings keyed by 1-based position, each with type and string value |
| `async` | boolean | No | Return immediately with a statement handle |

#### Output \[#output]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Get Statement \[#snowflake-get-statement]

Check a running or completed statement and retrieve exactly one result partition. Canceled or failed statements are returned as errors.

#### Input \[#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `statementHandle` | string | Yes | Statement handle returned by Snowflake |
| `partition` | number | No | Zero-based result partition to retrieve; defaults to 0 |
| `partitionCount` | number | No | Total number of result partitions, taken from the partitionCount of the first partition. Snowflake omits metadata from every later partition response, so supply this when fetching partition 1 or higher to keep truncated and nextPartition accurate |

#### Output \[#output-1]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Cancel Statement \[#snowflake-cancel-statement]

Cancel a running Snowflake SQL API statement.

#### Input \[#input-2]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `statementHandle` | string | Yes | Statement handle returned by Snowflake |

#### Output \[#output-2]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Insert Rows \[#snowflake-insert-rows]

Insert structured JSON rows using bound values.

#### Input \[#input-3]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `table` | string | Yes | Target Snowflake table name within the selected database and schema context |
| `rows` | json | Yes | Non-empty JSON array of row objects with matching keys. For bulk loads, stage the files and use Load Data instead. |

#### Output \[#output-3]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Update Rows \[#snowflake-update-rows]

Update matching rows with a bound MERGE statement without inserting new rows.

#### Input \[#input-4]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `table` | string | Yes | Target Snowflake table name within the selected database and schema context |
| `rows` | json | Yes | Non-empty JSON array of row objects with matching keys. For bulk loads, stage the files and use Load Data instead. |
| `matchColumns` | array | Yes | Columns used to match target rows. Match values must be non-null and unique across the submitted rows. |

#### Output \[#output-4]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Upsert Rows \[#snowflake-upsert-rows]

Update matching rows and insert unmatched rows with a bound MERGE statement.

#### Input \[#input-5]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `table` | string | Yes | Target Snowflake table name within the selected database and schema context |
| `rows` | json | Yes | Non-empty JSON array of row objects with matching keys. For bulk loads, stage the files and use Load Data instead. |
| `matchColumns` | array | Yes | Columns used to match target rows. Match values must be non-null and unique across the submitted rows. |

#### Output \[#output-5]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Delete Rows \[#snowflake-delete-rows]

Delete rows matching a required set of bound column filters.

#### Input \[#input-6]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `table` | string | Yes | Target Snowflake table name within the selected database and schema context |
| `filters` | json | Yes | Non-empty JSON object of column filters combined with AND. A null value matches rows where that column IS NULL; every other value is compared for equality against a bound parameter. |

#### Output \[#output-6]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Load Data \[#snowflake-load-data]

Load files from an existing Snowflake stage with COPY INTO.

#### Input \[#input-7]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `database` | string | Yes | Target database name |
| `schema` | string | Yes | Target schema name |
| `table` | string | Yes | Target table name |
| `stagePath` | string | Yes | Existing stage path, for example @my\_stage/path |
| `fileFormat` | string | No | Optional named file format |
| `pattern` | string | No | Optional regular expression used to select staged files |
| `onError` | string | No | COPY error handling: ABORT\_STATEMENT, CONTINUE, SKIP\_FILE, SKIP\_FILE\_\<count>, or SKIP\_FILE\_\<percent>% |
| `purge` | boolean | No | Remove successfully loaded files from the stage |
| `force` | boolean | No | Reload files even when Snowflake has loaded them before |
| `matchByColumnName` | string | No | CASE\_SENSITIVE, CASE\_INSENSITIVE, or NONE |

#### Output \[#output-7]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Unload Data \[#snowflake-unload-data]

Export a Snowflake table to files in a stage with COPY INTO.

#### Input \[#input-8]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `stagePath` | string | Yes | Destination stage reference, for example @EXPORTS/daily |
| `table` | string | Yes | Source table to unload. To export a query result, materialize it first as a view or with CREATE TABLE AS SELECT, then unload that |
| `fileFormat` | string | No | Named file format applied to the unloaded files |
| `header` | boolean | No | Whether to write column headings into the unloaded files; supported for CSV and Parquet only |
| `overwrite` | boolean | No | Whether to replace existing files with matching names in the stage |
| `singleFile` | boolean | No | Whether to write one file instead of splitting the output across files |
| `maxFileSizeBytes` | number | No | Upper size limit per unloaded file in bytes; Snowflake defaults to 16777216 (16 MB) and allows up to 5368709120 (5 GB) |

#### Output \[#output-8]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Databases \[#snowflake-list-databases]

List the databases the credential can access.

#### Input \[#input-9]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `nameLike` | string | No | Optional SQL LIKE pattern for object names |
| `limit` | number | No | Maximum rows, from 1 to 10000 |

#### Output \[#output-9]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Schemas \[#snowflake-list-schemas]

List the schemas in a Snowflake database.

#### Input \[#input-10]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `nameLike` | string | No | Optional SQL LIKE pattern for object names |
| `limit` | number | No | Maximum rows, from 1 to 10000 |

#### Output \[#output-10]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Tables \[#snowflake-list-tables]

List the tables in a Snowflake schema.

#### Input \[#input-11]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `nameLike` | string | No | Optional SQL LIKE pattern for object names |
| `limit` | number | No | Maximum rows, from 1 to 10000 |

#### Output \[#output-11]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Warehouses \[#snowflake-list-warehouses]

List warehouses visible to the active Snowflake role.

#### Input \[#input-12]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `nameLike` | string | No | Optional SQL LIKE pattern for warehouse names |

#### Output \[#output-12]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Get Warehouse \[#snowflake-get-warehouse]

Get the full details for a Snowflake virtual warehouse.

#### Input \[#input-13]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouseName` | string | Yes | Warehouse name |

#### Output \[#output-13]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Resume Warehouse \[#snowflake-resume-warehouse]

Resume a Snowflake virtual warehouse if it is suspended.

#### Input \[#input-14]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouseName` | string | Yes | Warehouse name |

#### Output \[#output-14]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Suspend Warehouse \[#snowflake-suspend-warehouse]

Suspend a Snowflake virtual warehouse.

#### Input \[#input-15]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouseName` | string | Yes | Warehouse name |

#### Output \[#output-15]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Alter Warehouse \[#snowflake-alter-warehouse]

Resize a Snowflake warehouse or change its auto-suspend and auto-resume settings.

#### Input \[#input-16]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouseName` | string | Yes | Warehouse name |
| `warehouseSize` | string | No | New warehouse size, one of XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE, XXXLARGE, X4LARGE, X5LARGE, X6LARGE |
| `autoSuspendSeconds` | number | No | Seconds of inactivity before the warehouse suspends. Snowflake polls every 30 seconds, so values under 30 or not a multiple of 30 may not behave as expected. 0 means the warehouse never suspends and keeps consuming credits |
| `autoResume` | boolean | No | Whether the warehouse resumes automatically when a statement is submitted |

#### Output \[#output-16]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Tasks \[#snowflake-list-tasks]

List tasks in a Snowflake schema.

#### Input \[#input-17]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `nameLike` | string | No | Optional SQL LIKE pattern for task names |
| `limit` | number | No | Maximum task rows, from 1 to 10000 |

#### Output \[#output-17]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Get Task \[#snowflake-get-task]

Describe a Snowflake task.

#### Input \[#input-18]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `taskName` | string | Yes | Task name |

#### Output \[#output-18]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Run Task \[#snowflake-run-task]

Run a Snowflake task immediately, optionally retrying its last failed graph.

#### Input \[#input-19]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `taskName` | string | Yes | Task name |
| `retryLast` | boolean | No | Retry the last failed task graph run |

#### Output \[#output-19]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Resume Task \[#snowflake-resume-task]

Resume a suspended Snowflake task so its schedule runs again.

#### Input \[#input-20]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `taskName` | string | Yes | Task name without a database or schema prefix |

#### Output \[#output-20]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Suspend Task \[#snowflake-suspend-task]

Suspend a Snowflake task so its schedule stops triggering runs.

#### Input \[#input-21]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `taskName` | string | Yes | Task name without a database or schema prefix |

#### Output \[#output-21]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Task Runs \[#snowflake-list-task-runs]

Query up to seven days of Snowflake task history, capped at 10000 rows.

#### Input \[#input-22]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `taskName` | string | No | Optional task name filter. TASK\_HISTORY supports only non-qualified task names, so pass DAILY\_LOAD rather than DB.SCHEMA.DAILY\_LOAD |
| `startTime` | string | No | Optional scheduled-time range start as an ISO timestamp within the last seven days |
| `endTime` | string | No | Optional scheduled-time range end as an ISO timestamp within the last seven days |
| `errorOnly` | boolean | No | Return only task runs that failed or were cancelled |
| `limit` | number | No | Maximum task runs, from 1 to 10000 |

#### Output \[#output-22]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Get Task Run \[#snowflake-get-task-run]

Find one task history record by query ID within Snowflake’s seven-day window and 10000 most recent records after optional filters.

#### Input \[#input-23]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `queryId` | string | Yes | Task run query ID from TASK\_HISTORY |
| `taskName` | string | No | Optional task name used to narrow the 10000-record history window. TASK\_HISTORY supports only non-qualified task names, so pass DAILY\_LOAD rather than DB.SCHEMA.DAILY\_LOAD |
| `startTime` | string | No | Optional scheduled-time range start as an ISO timestamp within the last seven days |
| `endTime` | string | No | Optional scheduled-time range end as an ISO timestamp within the last seven days |

#### Output \[#output-23]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Cancel Task Query \[#snowflake-cancel-task-query]

Cancel one running task query by query ID with SYSTEM$CANCEL\_QUERY. Task runs already in flight are unaffected and must be cancelled individually; a cancelled child marks the task graph run failed, so downstream tasks are skipped.

#### Input \[#input-24]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `queryId` | string | Yes | Query ID of the single running task query to cancel, taken from TASK\_HISTORY. Cancels only that query. |

#### Output \[#output-24]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Get Task Run Output \[#snowflake-get-task-run-output]

Read a task query result with RESULT\_SCAN during Snowflake’s 24-hour retention window using the task owner role.

#### Input \[#input-25]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `queryId` | string | Yes | Completed task query ID; task results require the task owner role, while manual query results require the same user |

#### Output \[#output-25]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Query History \[#snowflake-list-query-history]

List queries that completed in the last seven days, optionally filtered.

#### Input \[#input-26]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `userName` | string | No | Only queries run by this user; cannot be combined with warehouseName |
| `warehouseName` | string | No | Only queries run on this warehouse; cannot be combined with userName |
| `startTime` | string | No | ISO-8601 start of the query completion window, within the last seven days |
| `endTime` | string | No | ISO-8601 end of the query completion window, within the last seven days |
| `errorOnly` | boolean | No | Whether to return only queries that failed (execution status FAILED\_WITH\_ERROR or FAILED\_WITH\_INCIDENT). Snowflake applies the limit before this filter, so it selects the failures among the most recent queries rather than the most recent failures |
| `limit` | number | No | Maximum query rows, from 1 to 10000 |

#### Output \[#output-26]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake List Copy History \[#snowflake-list-copy-history]

List staged-file load results for a table over the last fourteen days.

#### Input \[#input-27]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `table` | string | Yes | Table whose load history to return |
| `startTime` | string | Yes | ISO-8601 start of the load window, within the last fourteen days |
| `endTime` | string | No | ISO-8601 end of the load window, within the last fourteen days; defaults to now |
| `limit` | number | No | Maximum load rows, from 1 to 10000 |

#### Output \[#output-27]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Introspect Schema \[#snowflake-introspect-schema]

Inspect table and column metadata through Snowflake INFORMATION\_SCHEMA views.

#### Input \[#input-28]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `database` | string | Yes | Database containing the INFORMATION\_SCHEMA views |
| `schema` | string | No | Optional exact schema name filter |
| `table` | string | No | Optional exact table name filter |
| `includeViews` | boolean | No | Include views and materialized views alongside tables |

#### Output \[#output-28]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Call Procedure \[#snowflake-call-procedure]

Call a stored procedure with explicitly typed Snowflake bindings.

#### Input \[#input-29]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `role` | string | No | Snowflake role to use for this statement |
| `statementTimeoutSeconds` | number | No | Statement timeout in seconds; 0 uses Snowflake maximum of 604800 seconds |
| `warehouse` | string | No | Warehouse to use for this statement; defaults to the PAT user setting |
| `maxRows` | number | No | Maximum result rows; defaults to 1000 with a Sim safety limit of 10000 |
| `database` | string | Yes | Database name |
| `schema` | string | Yes | Schema name |
| `procedureName` | string | Yes | Stored procedure name |
| `procedureArguments` | array | No | Ordered argument bindings with a Snowflake type and string value |

#### Output \[#output-29]

| Parameter | Type | Description |
| - | - | - |
| `statementHandle` | string | Snowflake statement handle |
| `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| `message` | string | Snowflake response message |
| `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Cortex Analyst Ask \[#snowflake-cortex-analyst-ask]

Ask Snowflake Cortex Analyst a question in natural language against a semantic view or semantic model. Returns its interpretation and the generated SQL, or suggested questions when the question is ambiguous, and can run the SQL to return rows. Pass the returned conversation as history to ask a follow-up.

#### Input \[#input-30]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `question` | string | Yes | The question to ask about your data |
| `semanticView` | string | No | Fully qualified semantic view name (for example MY\_DB.MY\_SCHEMA.MY\_VIEW). Provide exactly one semantic source. |
| `semanticModelFile` | string | No | Stage path to a semantic model YAML file (for example @MY\_DB.MY\_SCHEMA.MY\_STAGE/model.yaml). Provide exactly one semantic source. |
| `semanticModel` | string | No | Full semantic model YAML. Provide exactly one semantic source. |
| `semanticModels` | json | No | Several semantic sources for Cortex Analyst to choose between, as a JSON array of {"semantic\_view": "..."} or {"semantic\_model\_file": "@..."} objects. Provide exactly one semantic source. |
| `history` | json | No | Earlier conversation messages in order, as returned in the conversation output of a previous ask |
| `executeSql` | boolean | No | Run the generated SQL with the same credential and return the result rows |
| `warehouse` | string | No | Warehouse for running the generated SQL; defaults to the PAT user setting |
| `role` | string | No | Snowflake role for running the generated SQL. Cortex Analyst itself always answers under the access token role |
| `maxRows` | number | No | Maximum result rows when running the SQL; defaults to 1000 (Sim limit 10000) |
| `statementTimeoutSeconds` | number | No | Timeout in seconds for running the SQL; 0 uses the Snowflake maximum |

#### Output \[#output-30]

| Parameter | Type | Description |
| - | - | - |
| `requestId` | string | Cortex Analyst request ID, used to send feedback on this answer |
| `text` | string | How Cortex Analyst interpreted the question, or why it could not answer it (text content joined in order) |
| `sql` | string | SQL Cortex Analyst generated, or null when the question was ambiguous |
| `verifiedQuery` | object | Verified Query Repository entry used to generate the SQL, or null when none was used |
| ↳ `name` | string | Verified query name |
| ↳ `question` | string | Question the verified query answers |
| ↳ `sql` | string | SQL of the verified query |
| ↳ `verifiedAt` | number | When the query was last verified (Unix epoch seconds, UTC) |
| ↳ `verifiedBy` | string | Who verified the query |
| `suggestions` | array | Questions the semantic model can answer, returned instead of SQL when the question was ambiguous |
| `warnings` | array | Warnings Cortex Analyst raised about the request |
| `questionCategory` | string | How Cortex Analyst categorized the question (for example CLEAR\_SQL) |
| `modelNames` | array | Models used to generate the response |
| `semanticModelSelection` | object | Which semantic source Cortex Analyst chose when several were given, or null for a single source |
| ↳ `index` | number | Zero-based position of the chosen source in Semantic Sources |
| ↳ `semanticView` | string | Chosen semantic view |
| ↳ `semanticModelFile` | string | Chosen staged semantic model file |
| ↳ `inlineSemanticModel` | string | Chosen inline semantic model YAML |
| `cortexSearchRetrieval` | json | Entities Cortex Analyst resolved with Cortex Search (\[{service, query, response\_body}]), passed through as returned |
| `conversation` | array | Full conversation including this question and answer (analyst turns keep their text and SQL); pass it as History to ask a follow-up. Snowflake recommends starting a new conversation after many turns |
| ↳ `role` | string | user or analyst |
| ↳ `content` | array | Message content blocks (text, sql, suggestions) |
| `execution` | object | Result of running the generated SQL when Run Generated SQL is on, otherwise null. A query still running after 45 seconds returns status RUNNING with a statementHandle; fetch its rows with Get Statement |
| ↳ `statementHandle` | string | Snowflake statement handle |
| ↳ `status` | string | Statement status: SUCCEEDED, RUNNING, or CANCELED |
| ↳ `message` | string | Snowflake response message |
| ↳ `result` | object | Completed result partition, or null while running or when no result is available |
| ↳ `columns` | array | Documented Snowflake result column metadata, or null when Snowflake returned a metadata-less partition response |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Snowflake data type |
| ↳ `length` | number | Column length |
| ↳ `precision` | number | Numeric precision |
| ↳ `scale` | number | Numeric scale |
| ↳ `nullable` | boolean | Whether the column is nullable |
| ↳ `rows` | array | One complete Snowflake result partition as string or null arrays |
| ↳ `totalRows` | number | Total result rows |
| ↳ `currentPartition` | number | Zero-based partition returned |
| ↳ `partitionCount` | number | Total partitions in the result set. Snowflake reports this only on the first partition, so pass it back to Get Statement when fetching later partitions |
| ↳ `nextPartition` | number | Next partition to request with Get Statement, if one exists |
| ↳ `truncated` | boolean | Whether more result partitions remain to fetch with Get Statement, or null when Snowflake returned a metadata-less partition response and partitionCount was not supplied. Snowflake does not report when the requested row limit capped the result set, so that cap is never reflected here |
| ↳ `dml` | object | Completed DML statistics, or null when the statement has no DML statistics |
| ↳ `rowsInserted` | number | Rows inserted by the statement |
| ↳ `rowsUpdated` | number | Rows updated by the statement |
| ↳ `rowsDeleted` | number | Rows deleted by the statement |
| ↳ `duplicateRowsUpdated` | number | Duplicate rows updated by the statement |
| ↳ `rowsAffected` | number | Total inserted, updated, and deleted rows |

### Snowflake Cortex Analyst Feedback \[#snowflake-cortex-analyst-feedback]

Rate a Cortex Analyst answer thumbs up or down, with an optional comment. Feedback appears in the Snowsight Cortex Analyst monitoring tab.

#### Input \[#input-31]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `oauthCredential` | string | Yes | Snowflake credential (account host and programmatic access token) |
| `requestId` | string | Yes | Request ID returned by Cortex Analyst Ask |
| `positive` | boolean | Yes | true for positive (thumbs up) feedback, false for negative (thumbs down) |
| `feedbackMessage` | string | No | Optional feedback comment |

#### Output \[#output-31]

| Parameter | Type | Description |
| - | - | - |
| `success` | boolean | Whether the feedback was recorded |
