Skip to content
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

Merged
merged 3 commits into from Feb 15, 2022

Conversation

rafalh
Copy link
Contributor

@rafalh rafalh commented Feb 8, 2022

Add gcp_conn_id parameter to BigQuery sensors and deprecate bigquery_conn_id parameter.
Pass gcp_conn_id to BigQueryHook using gcp_conn_id to avoid deprecation warning in hook code.
Please note that a similar change for BigQuery operators was already performed in commit 042a9ba

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
@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Feb 8, 2022
@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Feb 15, 2022
@github-actions
Copy link

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',
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants