VladaZakharova commented on code in PR #28284:
URL: https://github.com/apache/airflow/pull/28284#discussion_r1051930431
##########
airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:
##########
@@ -544,43 +494,272 @@ def _check_schema_fields(self, table_resource):
:param table_resource: Configuration or table_resource dictionary
:return: table_resource: Updated table_resource dict with schema_fields
"""
- if not self.autodetect and not self.schema_fields:
- raise RuntimeError(
- "Table schema was not found. Set autodetect=True to "
- "automatically set schema fields from source objects or pass "
- "schema_fields explicitly"
- )
- elif not self.schema_fields:
+ if not self.schema_fields:
Review Comment:
Yes, seems like that. I was trying to add this logic to simplify working
with BigQuery schemas: as you know, BQ can only determine schema fields if the
values for every column is of non-string format. (please, check the link:
https://cloud.google.com/bigquery/docs/schema-detect#csv_header)
But turned out that my implementation needs a lot of reworking :)
I will remove this logic and let the schema fields be "string_field_1" as it
was before.
--
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]