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.
Execute one parameterized SQL statement through the Snowflake SQL API.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Check a running or completed statement and retrieve exactly one result partition. Canceled or failed statements are returned as errors.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Cancel a running Snowflake SQL API statement.
| Parameter | Type | Required | Description |
|---|
statementHandle | string | Yes | Statement handle returned by Snowflake |
| 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 |
Insert structured JSON rows using bound values.
| Parameter | Type | Required | Description |
|---|
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. |
| 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 |
Update matching rows with a bound MERGE statement without inserting new rows.
| Parameter | Type | Required | Description |
|---|
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. |
| 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 |
Update matching rows and insert unmatched rows with a bound MERGE statement.
| Parameter | Type | Required | Description |
|---|
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. |
| 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 |
Delete rows matching a required set of bound column filters.
| Parameter | Type | Required | Description |
|---|
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. |
| 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 |
Load files from an existing Snowflake stage with COPY INTO.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Export a Snowflake table to files in a stage with COPY INTO.
| Parameter | Type | Required | Description |
|---|
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) |
| 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 |
List the databases the credential can access.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
List the schemas in a Snowflake database.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
List the tables in a Snowflake schema.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
List warehouses visible to the active Snowflake role.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Get the full details for a Snowflake virtual warehouse.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Resume a Snowflake virtual warehouse if it is suspended.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Suspend a Snowflake virtual warehouse.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Resize a Snowflake warehouse or change its auto-suspend and auto-resume settings.
| Parameter | Type | Required | Description |
|---|
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 ${SNOWFLAKE_WAREHOUSE_SIZES.join(', ')} |
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 |
| 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 |
List tasks in a Snowflake schema.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Describe a Snowflake task.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Run a Snowflake task immediately, optionally retrying its last failed graph.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Resume a suspended Snowflake task so its schedule runs again.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Suspend a Snowflake task so its schedule stops triggering runs.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Query up to seven days of Snowflake task history, capped at 10000 rows.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Find one task history record by query ID within Snowflake’s seven-day window and 10000 most recent records after optional filters.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
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.
| Parameter | Type | Required | Description |
|---|
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. |
| 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 |
Read a task query result with RESULT_SCAN during Snowflake’s 24-hour retention window using the task owner role.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
List queries that completed in the last seven days, optionally filtered.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
List staged-file load results for a table over the last fourteen days.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Inspect table and column metadata through Snowflake INFORMATION_SCHEMA views.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |
Call a stored procedure with explicitly typed Snowflake bindings.
| Parameter | Type | Required | Description |
|---|
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 |
| 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 |