Skip to content

Commit

Permalink
Tracing the reset clause to ensure correct rendering of double quoted…
Browse files Browse the repository at this point in the history
… identifier.
  • Loading branch information
sfc-gh-tmathew committed Jun 2, 2024
1 parent b2b3882 commit b41e8e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions schemachange/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ def __init__(self, config):
self.autocommit = config["autocommit"]
self.verbose = config["verbose"]
if self.set_connection_args():
self.con = snowflake.connector.connect(**self.conArgs)
print(_log_current_session_id.format(current_session_id=self.con.session_id))
# Setting session context
print(self._q_set_sess_role.format(**self.conArgs))
print(self._q_set_sess_warehouse.format(**self.conArgs))
print(self._q_set_sess_database.format(**self.conArgs))
print(self._q_set_sess_schema.format(**self.conArgs))
self.con = snowflake.connector.connect(**self.conArgs)
print(_log_current_session_id.format(current_session_id=self.con.session_id))
# Setting session context

if not self.autocommit:
self.con.autocommit(False)
Expand Down Expand Up @@ -522,6 +522,8 @@ def reset_session(self):
if self.conArgs["schema"]:
reset_query += self._q_set_sess_schema.format(**self.conArgs) + " "

print("Resetting session context")
#print(reset_query)
self.execute_snowflake_query(reset_query)

def reset_query_tag(self, extra_tag=None):
Expand Down

0 comments on commit b41e8e1

Please sign in to comment.