This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new ecc3a4d  Add autocommit property for snowflake connection (#10838)
ecc3a4d is described below

commit ecc3a4df0da67f258c3ad04733d6e561d8266c93
Author: stijn-meersman <[email protected]>
AuthorDate: Fri Oct 30 13:23:07 2020 +0100

    Add autocommit property for snowflake connection (#10838)
---
 airflow/providers/snowflake/hooks/snowflake.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/airflow/providers/snowflake/hooks/snowflake.py 
b/airflow/providers/snowflake/hooks/snowflake.py
index a0bbedf..00a1e2b 100644
--- a/airflow/providers/snowflake/hooks/snowflake.py
+++ b/airflow/providers/snowflake/hooks/snowflake.py
@@ -135,3 +135,7 @@ class SnowflakeHook(DbApiHook):
 
     def set_autocommit(self, conn, autocommit: Any) -> None:
         conn.autocommit(autocommit)
+        conn.autocommit_mode = autocommit
+
+    def get_autocommit(self, conn):
+        return getattr(conn, 'autocommit_mode', False)

Reply via email to