Skip to content

Conversation

@coder-jatin-s
Copy link

Fix #350

Previously, schemachange would ignore any session parameters defined in the connections.toml file because it was overwriting them with its own session parameters. This fix:

  1. Preserves session parameters from connections.toml
  2. Properly merges QUERY_TAG values (combining existing tags with schemachange's tag)
  3. Maintains all other session parameters (e.g., QUOTED_IDENTIFIERS_IGNORE_CASE)

Example:
If your connections.toml has:
[STG]
session_parameters = {
QUOTED_IDENTIFIERS_IGNORE_CASE = false,
QUERY_TAG = "my_tag"
}

The session will now:

  • Keep QUOTED_IDENTIFIERS_IGNORE_CASE = false
  • Set QUERY_TAG = "my_tag;schemachange ;custom_tag" (if custom_tag provided)

Changes made:

  • Modified SnowflakeSession.py to read session parameters from connections.toml first
  • Added proper session parameter merging logic
  • Added test coverage in test_session_parameters.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

schemachange ignores session_parameters from connections.toml

1 participant