Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sdks/python/apache_beam/io/gcp/bigquery_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@
"GEOGRAPHY": str,
}

# Duplicated logic with io/gcp/bigquery_change_history.py
# Default table expiration for auto-created temp datasets: 24 hours in ms.
# Tables created in the dataset auto-expire after this duration if not
# explicitly deleted, acting as a safety net for orphaned temp tables
# (e.g. pipeline crash before cleanup runs).
_DEFAULT_TABLE_EXPIRATION_MS = 24 * 60 * 60 * 1000

class FileFormat(object):
CSV = 'CSV'
Expand Down Expand Up @@ -952,6 +958,7 @@ def create_temporary_dataset(
project_id,
self.temp_dataset_id,
location=location,
default_table_expiration_ms=_DEFAULT_TABLE_EXPIRATION_MS,
labels=labels,
kms_key=kms_key)

Expand Down
Loading