Skip to content

Commit ea5da92

Browse files
committed
address comments
1 parent af3b026 commit ea5da92

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

sdks/python/apache_beam/io/gcp/bigquery_file_loads.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ class TriggerCopyJobs(beam.DoFn):
491491
"""
492492

493493
TRIGGER_DELETE_TEMP_TABLES = 'TriggerDeleteTempTables'
494+
# https://docs.cloud.google.com/bigquery/quotas#copy_jobs
494495
MAX_SOURCES_PER_COPY_JOB = 1200
495496

496497
def __init__(
@@ -549,10 +550,7 @@ def process(
549550
'project', str, '') or self.project
550551
copy_from_references.append(copy_from_reference)
551552

552-
full_table_ref = '%s:%s.%s' % (
553-
copy_to_reference.projectId,
554-
copy_to_reference.datasetId,
555-
copy_to_reference.tableId)
553+
full_table_ref = bigquery_tools.get_hashable_destination(copy_to_reference)
556554

557555
is_first_time = full_table_ref not in self._observed_tables
558556
if is_first_time:
@@ -573,11 +571,7 @@ def process(
573571

574572
copy_job_name_base = '%s_%s' % (
575573
job_name_prefix,
576-
_bq_uuid(
577-
'%s:%s.%s' % (
578-
copy_to_reference.projectId,
579-
copy_to_reference.datasetId,
580-
copy_to_reference.tableId)))
574+
_bq_uuid(bigquery_tools.get_hashable_destination(copy_to_reference)))
581575

582576
project_id = (
583577
copy_to_reference.projectId

0 commit comments

Comments
 (0)