From 5f2bdf854eaba8bbd8be8d2cba846603e0924634 Mon Sep 17 00:00:00 2001 From: daoleno Date: Tue, 16 Jan 2024 05:06:08 +0800 Subject: [PATCH] fix(bq-syncer): ensure sync in oder --- bq-syncer/sync.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bq-syncer/sync.py b/bq-syncer/sync.py index 2bc6db1..ea447c1 100644 --- a/bq-syncer/sync.py +++ b/bq-syncer/sync.py @@ -169,6 +169,7 @@ def process_table(table, conn, dataset_ref, bqclient, idx): SELECT {', '.join(fields)} FROM `{table_ref}` WHERE datastream_metadata.source_timestamp > {last_timestamp} + ORDER BY datastream_metadata.source_timestamp ASC """ query_job = bqclient.query(query) pageNum = 0