Skip to content

Commit

Permalink
chore: add bq query logging for cost debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
daoleno committed Dec 27, 2023
1 parent d9bb750 commit 5dccd91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bq-syncer/sync_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def sync_table(table_item, index, total_tables):
for field, _ in fields
]
query = f"SELECT {', '.join(field_names_for_query)} FROM `{table_ref}` WHERE datastream_metadata.source_timestamp > {last_timestamp} ORDER BY datastream_metadata.source_timestamp ASC"
print(f"[{datetime.now()}] Query: {query}")

# Modify the query if --sample is set
if args.sample:
Expand Down

0 comments on commit 5dccd91

Please sign in to comment.