-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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 project_id as a templated variable in two BQ operators #24768
Conversation
You can check this example: airflow/tests/providers/google/cloud/operators/test_cloud_storage_transfer_service.py Lines 717 to 734 in a3c9956
|
@leahecole I'm fine with merging this without the test (most operators don't have it) can you please fix the static tests? |
Yup - sorry, was OOO for a US holiday, I'll look into it in the next couple of days |
Hi all! This is related to #23129. In BigQuery, fully qualified dataset names can be made using the GCP project ID even if the project ID isn't needed for the underlying API to work. It's not unusual to make
project_id
a default arg and to have it be templated, especially if you're using many BQ operators together. I've added it to two operators where I have used it to construct a dataset name.I'm not 100% sure how we test templated fields - I looked at the BQ operator test and didn't see any kind of validation, and the test values we're passing to the mocked calls are not templated. Any recommendations for how to handle that are appreciated!