fix(profiler): imporve logic for snowflake to pick up DML ran on different WH (#10150)

This commit is contained in:
Teddy 2023-02-08 15:53:43 +01:00 committed by GitHub
parent 7d827b6ae8
commit b62f97f27b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,8 +322,7 @@ def _(
metric_results: List[Dict] = [] metric_results: List[Dict] = []
information_schema_query_history = """ information_schema_query_history = """
SELECT * FROM table(information_schema.query_history_by_warehouse( SELECT * FROM table(information_schema.query_history(
warehouse_name=>CURRENT_WAREHOUSE(),
end_time_range_start=>to_timestamp_ltz(DATEADD(HOUR, -{decrement_start}, CURRENT_TIMESTAMP())), end_time_range_start=>to_timestamp_ltz(DATEADD(HOUR, -{decrement_start}, CURRENT_TIMESTAMP())),
end_time_range_end=>to_timestamp_ltz(DATEADD(HOUR, -{decrement_end}, CURRENT_TIMESTAMP())), end_time_range_end=>to_timestamp_ltz(DATEADD(HOUR, -{decrement_end}, CURRENT_TIMESTAMP())),
result_limit=>10000 result_limit=>10000