-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autodetect arg in BQCreateExternalTable Operator #22710
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
f1910fc
to
6994d60
Compare
@turbaszek @mik-laj Please review this PR at your earliest convenience. |
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
Awesome work, congrats on your first merged pull request! |
Closes #22129
This PR adds an
autodetect
flag (with a backward compatible default value) to the BigQueryCreateExternalTableOperator constructor. Ifschema_fields
andschema_object
are blank, and theautodetect
flag is set toTrue
, BigQuery will attempt to auto-detect the input data schema.Todo:
Documentation updates
Added the following line to the Google provider package docs.
Manual checks
I uploaded a CSV file containing the following to a Google Cloud Storage bucket in the
us-east1
region.I then ran a test DAG to create an external table based on the above CSV file. I enable BigQuery schema auto-detection by setting the
autodetect
flag toTrue
.The table is created with the correct field names and types. The table configuration also shows that schema auto-detection was enabled.