Snowflake

Download 0
Last updated Sep 7, 2025

snowflake-query-logs

Collects Snowflake query execution logs.

snowflake-query-logs profile=PROFILE [duration=NUM{mon|w|d|h|m|s}] [from=yyyyMMddHHmmss] [to=yyyyMMddHHmmss] [order=ORDER]
profile=PROFILE
Snowflake profile name
duration=NUM{mon|w|d|h|m|s}
Time duration (e.g., 1d, 2h, 30m)
from=yyyyMMddHHmmss
Start time
to=yyyyMMddHHmmss
End time
order=ORDER
Sort order (asc or desc, default: desc)

Output Fields

FieldTypeNameDescription
_timeDateTimeStatement start time
session_idLongSession IDSession identifier
transaction_idLongTransaction IDTransaction identifier
query_idStringQuery IDInternal/system-generated identifier for the SQL statement
userStringUserUser who issued the query
roleStringRoleRole used to execute the query
role_typeStringRole TypeType of role used
queryStringQueryText of the SQL statement
query_typeStringQuery TypeType of SQL statement
query_tagStringQuery TagQuery tag assigned to the statement
warehouse_nameStringWarehouseWarehouse that executed the query
user_typeStringUser TypeType of user who executed the query
statusStringStatusExecution status (success, fail, incident)
error_codeStringError CodeError code if query failed
error_messageStringError MessageError message details
elapsed_timeLongTotal TimeTotal elapsed time in milliseconds
end_timeDateEnd TimeStatement end time
databaseStringDatabaseDatabase used for the query
schemaStringSchemaSchema used for the query
database_idLongDatabase IDDatabase identifier
schema_idLongSchema IDSchema identifier
user_database_nameStringUser Database NameDatabase name when the user type is SNOWFLAKE_SERVICE
user_schema_nameStringUser Schema NameSchema name when the user type is SNOWFLAKE_SERVICE
user_database_idLongUser Database IDDatabase ID when the user type is SNOWFLAKE_SERVICE
user_schema_idLongUser Schema IDSchema ID when the user type is SNOWFLAKE_SERVICE
warehouse_sizeStringWarehouse SizeSize of the warehouse used
warehouse_typeStringWarehouse TypeType of warehouse used
warehouse_idLongWarehouse IDWarehouse identifier
cluster_numberIntegerCluster NumberCluster number that executed the query
execution_timeLongExecution TimeTime spent executing the query
compilation_timeLongCompilation TimeTime spent compiling the query
queued_overload_timeLongQueued Overload TimeTime spent queued due to overload
queued_provisioning_timeLongQueued Provisioning TimeTime spent queued for provisioning
queued_repair_timeLongQueued Repair TimeTime spent queued for repair
transaction_blocked_timeLongTransaction Blocked TimeTime blocked by transactions
child_queries_wait_timeLongChild Queries Wait TimeTime spent waiting for child queries
fault_handling_timeLongFault Handling TimeTime spent handling faults
list_external_files_timeLongList External Files TimeTime spent listing external files
query_retry_timeLongQuery Retry TimeTotal execution time for query retries
query_retry_causeStringQuery Retry CauseCause of query retry
bytes_scannedLongBytes ScannedNumber of bytes scanned
bytes_deletedLongBytes DeletedNumber of bytes deleted
bytes_read_from_resultLongBytes Read From ResultNumber of bytes read from the query result
bytes_sent_over_the_networkLongBytes Sent Over NetworkBytes sent over the network
bytes_spilled_to_local_storageLongBytes Spilled LocalBytes spilled to local storage
bytes_spilled_to_remote_storageLongBytes Spilled RemoteBytes spilled to remote storage
bytes_writtenLongBytes WrittenNumber of bytes written
bytes_written_to_resultLongBytes Written To ResultNumber of bytes written to the query result
rowsLongRows ProducedNumber of rows produced by the query
rows_insertedLongRows InsertedNumber of rows inserted
rows_updatedLongRows UpdatedNumber of rows updated
rows_deletedLongRows DeletedNumber of rows deleted
rows_unloadedLongRows UnloadedNumber of rows unloaded
rows_written_to_resultLongRows Written To ResultNumber of rows written to the query result
partitions_scannedLongPartitions ScannedNumber of partitions scanned
partitions_totalLongTotal PartitionsTotal number of partitions available
percentage_scanned_from_cacheDoublePercentage Scanned From CachePercentage of data scanned from cache
query_load_percentDoubleQuery Load PercentQuery load percentage
credits_used_cloud_servicesDoubleCredits UsedCloud services credits consumed
query_acceleration_bytes_scannedLongQuery Acceleration Bytes ScannedBytes scanned by query acceleration
query_acceleration_partitions_scannedLongQuery Acceleration Partitions ScannedPartitions scanned by query acceleration
query_acceleration_upper_limit_scale_factorDoubleQuery Acceleration Upper Limit Scale FactorQuery acceleration upper limit scale factor
inbound_data_transfer_bytesLongInbound Data Transfer BytesInbound data transfer bytes
inbound_data_transfer_cloudStringInbound Data Transfer CloudInbound data transfer cloud
inbound_data_transfer_regionStringInbound Data Transfer RegionInbound data transfer region
outbound_data_transfer_bytesLongOutbound Data Transfer BytesOutbound data transfer bytes
outbound_data_transfer_cloudStringOutbound Data Transfer CloudOutbound data transfer cloud
outbound_data_transfer_regionStringOutbound Data Transfer RegionOutbound data transfer region
external_function_total_invocationsLongExternal Function Total InvocationsTotal external function invocations
external_function_total_received_bytesLongExternal Function Total Received BytesTotal bytes received by external functions
external_function_total_received_rowsLongExternal Function Total Received RowsTotal rows received by external functions
external_function_total_sent_bytesLongExternal Function Total Sent BytesTotal bytes sent to external functions
external_function_total_sent_rowsLongExternal Function Total Sent RowsTotal rows sent to external functions
release_versionStringRelease VersionSnowflake release version
is_client_generated_statementBoolIs Client Generated StatementWhether statement was generated by client
secondary_role_statsStringSecondary Role StatsSecondary role statistics
query_hashStringQuery HashHash of the exact query text
query_hash_versionIntegerQuery Hash VersionVersion of the query hash
query_parameterized_hashStringQuery Parameterized HashHash value created by removing literals from the query text and then hashing
query_parameterized_hash_versionIntegerQuery Parameterized Hash VersionVersion of parameterized hash