diff --git a/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py b/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py index 5a9edc827918e..065b473b747b2 100644 --- a/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +++ b/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py @@ -20,7 +20,6 @@ import json from typing import Optional, Sequence, Union -from airflow.exceptions import AirflowException from airflow.models import BaseOperator from airflow.providers.google.cloud.hooks.bigquery import BigQueryHook from airflow.providers.google.cloud.hooks.gcs import GCSHook @@ -274,10 +273,6 @@ def execute(self, context): object_name=self.schema_object, ) schema_fields = json.loads(blob.decode("utf-8")) - elif self.schema_object is None and self.autodetect is False: - raise AirflowException( - 'At least one of `schema_fields`, `schema_object`, or `autodetect` must be passed.' - ) else: schema_fields = None