chamikaramj commented on a change in pull request #11086: [BEAM-8910] Make
custom BQ source read from Avro
URL: https://github.com/apache/beam/pull/11086#discussion_r409022421
##########
File path: sdks/python/apache_beam/io/gcp/bigquery.py
##########
@@ -732,11 +748,20 @@ def _export_files(self, bq):
bigquery.TableSchema instance, a list of FileMetadata instances
"""
job_id = uuid.uuid4().hex
- job_ref = bq.perform_extract_job([self.gcs_location],
- job_id,
- self.table_reference,
- bigquery_tools.FileFormat.JSON,
- include_header=False)
+ if self.use_json_exports:
+ job_ref = bq.perform_extract_job([self.gcs_location],
+ job_id,
+ self.table_reference,
+ bigquery_tools.FileFormat.JSON,
+ include_header=False)
+ else:
+ job_ref = bq.perform_extract_job([self.gcs_location],
Review comment:
Let's document subtle differences between the two types (and two transforms
?) in doc comments of _ReadFromBigQuery so that users who upgrade/change the
BigQuery read transforms have clear guidelines for updating their pipelines.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services