Skip to content

Commit 9a9ce78

Browse files
Dylan Peckleahecolegcf-merge-on-green[bot]
authored
Updated gcs_to_bq method (#4105)
Copying from gcs_to_bq method was throwing errors in airflow due to having no defined schema values, object, or autodetect set. Co-authored-by: Leah E. Cole <[email protected]> Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
1 parent 8c18cec commit 9a9ce78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

composer/workflows/bq_copy_across_locations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def read_table_list(table_list_file):
174174
source_objects=['{}-*.avro'.format(table_source)],
175175
destination_project_dataset_table=table_dest,
176176
source_format='AVRO',
177-
write_disposition='WRITE_TRUNCATE'
177+
write_disposition='WRITE_TRUNCATE',
178+
autodetect=True
178179
)
179180

180181
start >> BQ_to_GCS >> GCS_to_GCS >> GCS_to_BQ >> end

0 commit comments

Comments
 (0)