Snowflake-Labs / schemachange

A Database Change Management tool for Snowflake
Apache License 2.0
517 stars 228 forks source link

Log Current Session ID #245

Closed opodoprigora closed 7 months ago

opodoprigora commented 7 months ago

Log Current Session ID

opodoprigora commented 7 months ago

Based on feature https://github.com/Snowflake-Labs/schemachange/issues/243

opodoprigora commented 7 months ago

@sfc-gh-twhite please take a look when ever you have a chance.

sfc-gh-twhite commented 7 months ago

Thank you for the PR!

I would opt to use the session_id that is available from the property of the Snowflake connection. For example, we can do this:

import snowflake.connector

con = snowflake.connector.connect()

print(con.session_id)

I believe that avoids the extra query submission. :)

opodoprigora commented 7 months ago

@sfc-gh-twhite good call 💪 , updated.

sfc-gh-twhite commented 7 months ago

Awesome job! We're doing a good bit of overhauling from a maintenance perspective of this project, but hopefully we can get this one in soon.