Skip to content

Commit aaba34b

Browse files
bingqinzhouashb
bingqinzhou
authored andcommitted
[AIRFLOW-5152] Change back autodetect default value from False to True in GoogleCloudStorageToBigQueryOperator. (apache#5771)
Set autodetect default value from false to be true to avoid breaking downstream services using GoogleCloudStorageToBigQueryOperator but not aware of the newly added autodetect field. This is to fix the current regression introduced by apache#3880 (cherry picked from commit 462ab88)
1 parent 469d731 commit aaba34b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

airflow/contrib/operators/gcs_to_bq.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class GoogleCloudStorageToBigQueryOperator(BaseOperator):
127127
Not applicable for external tables.
128128
:type cluster_fields: list[str]
129129
:param autodetect: [Optional] Indicates if we should automatically infer the
130-
options and schema for CSV and JSON sources. (Default: ``False``).
130+
options and schema for CSV and JSON sources. (Default: ``True``).
131131
Parameter must be setted to True if 'schema_fields' and 'schema_object' are undefined.
132132
It is suggested to set to True if table are create outside of Airflow.
133133
:type autodetect: bool
@@ -171,7 +171,7 @@ def __init__(self,
171171
external_table=False,
172172
time_partitioning=None,
173173
cluster_fields=None,
174-
autodetect=False,
174+
autodetect=True,
175175
encryption_configuration=None,
176176
*args, **kwargs):
177177

0 commit comments

Comments
 (0)