| name | snowflake-debug-bundle |
| description | Collect Snowflake debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support cases,
or collecting diagnostic information from QUERY_HISTORY and ACCOUNT_USAGE.
Trigger with phrases like "snowflake debug", "snowflake support bundle",
"snowflake diagnostic", "snowflake query history", "snowflake troubleshoot".
|
| allowed-tools | Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","data-warehouse","analytics","snowflake"] |
| compatibility | Designed for Claude Code |
Snowflake Debug Bundle
Overview
Collect diagnostic information from Snowflake's ACCOUNT_USAGE views, QUERY_HISTORY, and driver logs for support tickets and troubleshooting.
Prerequisites
- Role with access to
SNOWFLAKE.ACCOUNT_USAGE schema (typically ACCOUNTADMIN)
- Access to application logs
- Permission to collect environment info
Instructions
Step 1: Query-Level Diagnostics
SELECT query_id, query_text, execution_status, error_code, error_message,
start_time, end_time, total_elapsed_time / 1000 AS elapsed_seconds,
bytes_scanned, rows_produced, compilation_time, execution_time,
warehouse_name, warehouse_size
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE query_id = '<paste-query-id-here>';
SELECT query_id, query_text, error_code, error_message,
start_time, user_name, role_name, warehouse_name
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE execution_status = 'FAIL'
AND start_time >= DATEADD(hours, -24, CURRENT_TIMESTAMP())
ORDER BY start_time DESC
LIMIT 20;
SELECT query_id, query_text, total_elapsed_time / 1000 AS seconds,
bytes_scanned / 1e9 AS gb_scanned, partitions_scanned, partitions_total,
warehouse_name, warehouse_size
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE total_elapsed_time
start_time DATEADD(hours, , ())
total_elapsed_time
LIMIT ;