-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
[AIRFLOW-5682] Allow labels in gcs_to_bq operator #6351
Conversation
According to the integration guide, you should also add default labels with the Airflow version |
@mik-laj sorry, I don't seem to have access to that google doc. |
Also it seems the other BQ-related operators that support labels don't pass in the Airflow version as a default label. |
Currently, this integration is being analyzed and will be refactored later to make it comply with the guide. We want to ensure similar behavior for all GCP integrations, but BigQuery just isn't done yet. @TobKed Do you want to add something? I have the impression that you are responsible for this integration. |
|
Codecov Report
@@ Coverage Diff @@
## master #6351 +/- ##
==========================================
- Coverage 80.07% 79.69% -0.38%
==========================================
Files 616 616
Lines 35794 35800 +6
==========================================
- Hits 28662 28532 -130
- Misses 7132 7268 +136
Continue to review full report at Codecov.
|
Alright, updated to add in the |
Adds support for labels when using the GoogleCloudStorageToBigQuery operator. Additionally automatically adds an `airflow-version` label set to the current airflow version.
config['labels'], {'label1': 'test1', 'label2': 'test2', | ||
'airflow-version': hook._AIRFLOW_VERSION} | ||
) | ||
mocked_rwc.side_effect = run_with_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use assert_called_once_with instead creating special function? This will make the code clearer.
Travis is sad. Can you fix it? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @lyallcooper could rebase on the newest master please? There are some changes which cause travis to be sad |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Make sure you have checked all steps below.
Jira
Description
operator.
Tests
test_bigquery.TestLabelsInRunLoad
Commits
Documentation