You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/27 16:08:34 UTC

[GitHub] [beam] ahmedabu98 commented on a diff in pull request #21867: Beam 12994 - Python SDK BigQuery - Promote `schemaUpdateOptions` to named arguments

ahmedabu98 commented on code in PR #21867:
URL: https://github.com/apache/beam/pull/21867#discussion_r931244462


##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -527,6 +531,7 @@ def _insert_load_job(
                     schema=job_schema,
                     writeDisposition=write_disposition,
                     createDisposition=create_disposition,
+                    schemaUpdateOptions=schema_update_options,
                     sourceFormat=source_format,
                     useAvroLogicalTypes=True,
                     autodetect=schema == 'SCHEMA_AUTODETECT',

Review Comment:
   We should confirm early in WriteToBigQuery that the schema update options are present in either `schema_update_options` or `additional_load_parameters` and resolve if options are present in both. 
   
   If options are present in `additional_load_parameters` at this point, we would have two `schemaUpdateOptions` parameters here.



##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -527,6 +531,7 @@ def _insert_load_job(
                     schema=job_schema,
                     writeDisposition=write_disposition,
                     createDisposition=create_disposition,
+                    schemaUpdateOptions=schema_update_options,
                     sourceFormat=source_format,
                     useAvroLogicalTypes=True,
                     autodetect=schema == 'SCHEMA_AUTODETECT',

Review Comment:
   We should also allow backwards compatibility. If users want to keep using `additional_load_parameters` instead to specify update options, would they be able to?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org