From 5d883378f8108206606e2279f172971eb59bb5fe Mon Sep 17 00:00:00 2001 From: Derek Visch Date: Thu, 10 Oct 2024 14:24:10 -0400 Subject: [PATCH] bug: Sessions should stay open even if snowflake is idle for hours (#272) Fixes #270 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- target_snowflake/connector.py | 1 + 1 file changed, 1 insertion(+) diff --git a/target_snowflake/connector.py b/target_snowflake/connector.py index 74f3e73..0e4fe31 100644 --- a/target_snowflake/connector.py +++ b/target_snowflake/connector.py @@ -218,6 +218,7 @@ def create_engine(self) -> Engine: "session_parameters": { "QUOTED_IDENTIFIERS_IGNORE_CASE": "TRUE", }, + "client_session_keep_alive": True, # See https://github.com/snowflakedb/snowflake-connector-python/issues/218 } if self.auth_method == SnowflakeAuthMethod.KEY_PAIR: connect_args["private_key"] = self.get_private_key()