What can you do with it?

Execute SQL queries and manage data warehousing operations in Snowflake, including submitting statements for execution, monitoring their status, and canceling long-running queries when needed.

How to use it?

Basic Command Structure

/your-snowflake-connection [action] [required-parameters] [optional-parameters]

Parameters

Required:

  • action - The operation to perform (execute, check-status, cancel)

Optional:

  • timeout - Query timeout in seconds (default: 60)
  • statement-handle - Handle for status checking or cancellation

Tools

Execute SQL Statement

Submit a SQL statement for execution in Snowflake

Parameters:

  • statement (required) - The SQL statement to execute
  • timeout (optional) - Query timeout in seconds

Example:

/your-snowflake-connection
action: execute
statement: SELECT * FROM my_table WHERE id = 1
timeout: 60

Response:

{
  "statementHandle": "01234567-89ab-cdef-0123-456789abcdef",
  "resultSetMetaData": {
    "numRows": 1,
    "format": "jsonv2",
    "rowType": [
      {
        "name": "ID",
        "type": "integer",
        "nullable": false
      },
      {
        "name": "NAME",
        "type": "string",
        "nullable": true
      }
    ]
  },
  "data": [
    [1, "Sample Name"]
  ]
}

Check Statement Status

Retrieve the status of a previously submitted SQL statement

Parameters:

  • statement-handle (required) - The handle of the statement to check

Example:

/your-snowflake-connection
action: check-status
statement-handle: 01234567-89ab-cdef-0123-456789abcdef

Response:

{
  "statementHandle": "01234567-89ab-cdef-0123-456789abcdef",
  "status": "Complete",
  "resultSetMetaData": {
    "numRows": 1,
    "format": "jsonv2",
    "rowType": [
      {
        "name": "ID",
        "type": "integer",
        "nullable": false
      }
    ]
  },
  "data": [
    [1, "Sample Name"]
  ]
}

Cancel Statement Execution

Cancel the execution of a running SQL statement

Parameters:

  • statement-handle (required) - The handle of the statement to cancel

Example:

/your-snowflake-connection
action: cancel
statement-handle: 01234567-89ab-cdef-0123-456789abcdef

Response:

{
  "statementHandle": "01234567-89ab-cdef-0123-456789abcdef",
  "status": "Cancelled"
}

Notes

Snowflake supports standard SQL syntax and provides detailed metadata about query results including row types, column names, and data types.