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/09 14:58:15 UTC

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

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



##########
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:
       Hold off on deprecating the old name -- I'd like to see if it's possible to not "leak" the `extra__snowflake__` part -- that's a UI abstraction that has crept in that shouldn't be in the extra JSON.




----------------------------------------------------------------
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