harryplumer opened a new issue #19503: URL: https://github.com/apache/airflow/issues/19503
### Apache Airflow Provider(s) snowflake ### Versions of Apache Airflow Providers apache-airflow-providers-snowflake==2.2.0 ### Apache Airflow version 2.2.0 ### Operating System Linux-5.4.141-67.229.amzn2.x86_64-x86_64-with-glibc2.31 ### Deployment Astronomer ### Deployment details _No response_ ### What happened The `get_connection()` method is called twice in the SnowflakeHook, initializing the connection twice and slowing the hook down. See the following example logs on a single `run` of the SnowflakeHook: <img width="1383" alt="Screen Shot 2021-11-09 at 9 59 26 PM" src="https://user-images.githubusercontent.com/30101670/141052877-648a5543-cf9a-4c16-82a6-02f6b62b47ba.png"> ### What you expected to happen The code is using the `get_connection` method on [line 271](https://github.com/apache/airflow/blob/main/airflow/providers/snowflake/hooks/snowflake.py#L271) and then calling the method again on [line 272](https://github.com/apache/airflow/blob/main/airflow/providers/snowflake/hooks/snowflake.py#L272) ### How to reproduce Run the SnowflakeHook ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
