mlauter commented on code in PR #64505:
URL: https://github.com/apache/airflow/pull/64505#discussion_r3040701992
##########
providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:
##########
@@ -570,11 +595,15 @@ def _create_external_table(self):
)
external_config_api_repr[src_fmt_to_param_mapping[self.source_format]] =
self.src_fmt_configs
- external_config =
ExternalConfig.from_api_repr(external_config_api_repr)
if self.schema_fields:
- external_config.schema = [SchemaField.from_api_repr(f) for f in
self.schema_fields]
+ external_config_api_repr["schema"] = {"fields": self.schema_fields}
if self.max_bad_records:
- external_config.max_bad_records = self.max_bad_records
+ external_config_api_repr["maxBadRecords"] = self.max_bad_records
+
+ if self.extra_config:
+ external_config_api_repr.update(self.extra_config)
+
+ external_config =
ExternalConfig.from_api_repr(external_config_api_repr)
Review Comment:
moving this below so that extra_config takes precedence over schema_fields
and max_bad_records
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]