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/12/27 21:29:24 UTC

[GitHub] [airflow] khalidmammadov commented on a change in pull request #20509: Fix for #20032

khalidmammadov commented on a change in pull request #20509:
URL: https://github.com/apache/airflow/pull/20509#discussion_r775650614



##########
File path: airflow/providers/snowflake/hooks/snowflake.py
##########
@@ -222,10 +222,17 @@ def get_uri(self) -> str:
         return self._conn_params_to_sqlalchemy_uri(conn_params)
 
     def _conn_params_to_sqlalchemy_uri(self, conn_params: Dict) -> str:
-        uri = (
-            'snowflake://{user}:{password}@{account}.{region}/{database}/{schema}'
+        if conn_params['region'] == '':
+            del conn_params['region']
+            uri = (
+            'snowflake://{user}:{password}@{account}/{database}/{schema}'

Review comment:
       ```suggestion
           region = conn_params.get('region')
           conn_params['region'] = f".{region}" if region else ''
           uri = (
               'snowflake://{user}:{password}@{account}{region}/{database}/{schema}'
               '?warehouse={warehouse}&role={role}&authenticator={authenticator}'
           )
   ```




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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org