mik-laj commented on a change in pull request #6093: [AIRFLOW-5475] Normalize 
gcp_conn_id in operators and hooks
URL: https://github.com/apache/airflow/pull/6093#discussion_r324406886
 
 

 ##########
 File path: airflow/gcp/hooks/bigquery.py
 ##########
 @@ -47,15 +48,23 @@ class BigQueryHook(GoogleCloudBaseHook, DbApiHook):
     Interact with BigQuery. This hook uses the Google Cloud Platform
     connection.
     """
-    conn_name_attr = 'bigquery_conn_id'  # type: str
+    conn_name_attr = 'gcp_conn_id'  # type: str
 
     def __init__(self,
-                 bigquery_conn_id: str = 'google_cloud_default',
+                 gcp_conn_id: str = 'google_cloud_default',
                  delegate_to: Optional[str] = None,
                  use_legacy_sql: bool = True,
-                 location: Optional[str] = None) -> None:
+                 location: Optional[str] = None,
+                 bigquery_conn_id: Optional[str] = None) -> None:
+        # To preserve backward compatibility
+        # TODO: remove one day
+        if bigquery_conn_id:
+            warnings.warn(
+                "The bigquery_conn_id parameter has been deprecated. You 
should pass "
+                "the gcp_conn_id parameter.", DeprecationWarning)
 
 Review comment:
   isn't stack level missing here? For me it should be 2.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to