Skip to content

Commit 7c5922d

Browse files
hsheth2ksrinath
authored andcommitted
fix(ingest/snowflake): order queries for queries_v2 (datahub-project#12551)
1 parent b411a97 commit 7c5922d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_queries.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,9 @@ def _build_enriched_query_log_query(
731731
JOIN filtered_access_history a USING (query_id)
732732
)
733733
SELECT * FROM query_access_history
734+
-- Our query aggregator expects the queries to be added in chronological order.
735+
-- It's easier for us to push down the sorting to Snowflake/SQL instead of doing it in Python.
736+
ORDER BY QUERY_START_TIME ASC
734737
"""
735738

736739

0 commit comments

Comments
 (0)