Content-Length: 280257 | pFad | https://github.com/apache/airflow/commit/7458f1e7861e5146da61cbff9393d72c88a3608c

0D Remove check for at least one schema in GCSToBigquery (#18150) · apache/airflow@7458f1e · GitHub
Skip to content

Commit 7458f1e

Browse files
authored
Remove check for at least one schema in GCSToBigquery (#18150)
For the case when updating an existing table or insert data to a particular partition, no schema is needed. Autodetect doesn't always work, e.g. cannot distinguish partition correctly. Other options requires forking the schema to airflow.
1 parent a54f8d6 commit 7458f1e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

airflow/providers/google/cloud/transfers/gcs_to_bigquery.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import json
2121
from typing import Optional, Sequence, Union
2222

23-
from airflow.exceptions import AirflowException
2423
from airflow.models import BaseOperator
2524
from airflow.providers.google.cloud.hooks.bigquery import BigQueryHook
2625
from airflow.providers.google.cloud.hooks.gcs import GCSHook
@@ -274,10 +273,6 @@ def execute(self, context):
274273
object_name=self.schema_object,
275274
)
276275
schema_fields = json.loads(blob.decode("utf-8"))
277-
elif self.schema_object is None and self.autodetect is False:
278-
raise AirflowException(
279-
'At least one of `schema_fields`, `schema_object`, or `autodetect` must be passed.'
280-
)
281276
else:
282277
schema_fields = None
283278

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/apache/airflow/commit/7458f1e7861e5146da61cbff9393d72c88a3608c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy