Data Pipeline Automation in Snowflake
Emily Melhuish
Technical Curriculum Developer, Snowflake


Access via: Monitoring > Query History > [Select Query] > Query Profile Tab

Exploding Joins
Union without All
UNION to remove duplicatesSpill to Disk
Inefficient Pruning
Diagnostic Query
SELECT
query_id,
bytes_spilled_to_local_storage,
bytes_spilled_to_remote_storage
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE bytes_spilled_to_remote_storage > 0
ORDER BY bytes_spilled_to_remote_storage DESC
LIMIT 10;
ACCOUNT_USAGE.QUERY_HISTORY - view with 365 day retentionINFORMATION_SCHEMA.QUERY_HISTORY() table function with 7 day retention

Data Pipeline Automation in Snowflake