kaxil closed pull request #4430: AIRFLOW-3316 be sure to initialize schema_fields variable URL: https://github.com/apache/incubator-airflow/pull/4430
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/airflow/contrib/operators/gcs_to_bq.py b/airflow/contrib/operators/gcs_to_bq.py index a98e15a8d6..abbf380b2d 100644 --- a/airflow/contrib/operators/gcs_to_bq.py +++ b/airflow/contrib/operators/gcs_to_bq.py @@ -208,6 +208,8 @@ def execute(self, context): elif self.schema_object is None and self.autodetect is False: raise ValueError('At least one of `schema_fields`, `schema_object`, ' 'or `autodetect` must be passed.') + else: + schema_fields = None else: schema_fields = self.schema_fields ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services