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
Normalize *_conn_id parameters in BigQuery sensors #21430
Normalize *_conn_id parameters in BigQuery sensors #21430
Conversation
It fixes deprecation warning in `BigQueryHook` because of `bigquery_conn_id` parameter usage from sensors code. Note: similar change for BigQuery operators was already performed in commit 042a9ba
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. |
@@ -64,25 +71,31 @@ def __init__( | |||
project_id: str, | |||
dataset_id: str, | |||
table_id: str, | |||
bigquery_conn_id: str = 'google_cloud_default', | |||
gcp_conn_id: str = 'google_cloud_default', |
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.
Just an idea for further improvement - maybe it would be good to introduce constant for this value and use it in all cases?
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.
+1
Add
gcp_conn_id
parameter to BigQuery sensors and deprecatebigquery_conn_id
parameter.Pass
gcp_conn_id
toBigQueryHook
usinggcp_conn_id
to avoid deprecation warning in hook code.Please note that a similar change for BigQuery operators was already performed in commit 042a9ba