You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/08 22:01:53 UTC

[GitHub] [airflow] sunkickr commented on a change in pull request #14631: Add Dynamic fields to Snowflake Connection

sunkickr commented on a change in pull request #14631:
URL: https://github.com/apache/airflow/pull/14631#discussion_r589779902



##########
File path: airflow/providers/snowflake/hooks/snowflake.py
##########
@@ -58,10 +135,10 @@ def _get_conn_params(self) -> Dict[str, Optional[str]]:
         conn = self.get_connection(
             self.snowflake_conn_id  # type: ignore[attr-defined] # pylint: disable=no-member
         )
-        account = conn.extra_dejson.get('account', '')
-        warehouse = conn.extra_dejson.get('warehouse', '')
-        database = conn.extra_dejson.get('database', '')
-        region = conn.extra_dejson.get("region", '')
+        account = conn.extra_dejson.get('extra__snowflake__account', '')
+        warehouse = conn.extra_dejson.get('extra__snowflake__warehouse', '')
+        database = conn.extra_dejson.get('extra__snowflake__database', '')
+        region = conn.extra_dejson.get('extra__snowflake__region', '')

Review comment:
       world this be a proper fix? 
   ```python
   account = conn.extra_dejson.get('extra__snowflake__account', '') \
               or conn.extra_dejson.get('account', '')
   ```




----------------------------------------------------------------
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:
users@infra.apache.org