Skip to content

bugfix - prevent table parameter duplication in Snowflake options dictionary#190

Open
dannymeijer wants to merge 12 commits intomainfrom
188-bug-snowflake-sync-incorrect-parameter-propagation-wrt-table
Open

bugfix - prevent table parameter duplication in Snowflake options dictionary#190
dannymeijer wants to merge 12 commits intomainfrom
188-bug-snowflake-sync-incorrect-parameter-propagation-wrt-table

Conversation

@dannymeijer
Copy link
Member

@dannymeijer dannymeijer commented Apr 17, 2025

Fixed an issue in SnowflakeBaseModel.get_options() where the 'table' parameter was being included in the options dictionary, causing conflicts in nested operations - like AddColumn - during schema synchronization. The fix excludes the table parameter while maintaining proper parameter handling for Snowflake connections, ensuring that operations can properly cascade options without parameter conflicts.

The implementation also improves overall parameter handling across the Snowflake and JDBC reader classes while maintaining backwards compatibility.

Related Issue

closes #188

How Has This Been Tested?

New test has been added to cover for this scenario

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@dannymeijer dannymeijer added the bug Something isn't working label Apr 17, 2025
@dannymeijer dannymeijer added this to the 0.11 milestone Apr 17, 2025
@dannymeijer dannymeijer self-assigned this Apr 17, 2025
@dannymeijer dannymeijer requested a review from a team as a code owner April 17, 2025 12:53
@dannymeijer dannymeijer changed the title 188 bug snowflake sync incorrect parameter propagation wrt table bugfix - prevent table parameter duplication in Snowflake options dictionary Apr 17, 2025
@dannymeijer dannymeijer moved this to In progress in Koheesio Apr 17, 2025
dannymeijer and others added 6 commits April 17, 2025 16:02
- Resolved merge conflicts in SnowflakeBaseModel.get_options()
- Preserved table parameter exclusion fix for issue #188
- Merged latest Context.from_yaml() fix from main
- Updated release notes to include both bug fixes
- All tests passing, table parameter conflict resolved
@dannymeijer
Copy link
Member Author

Ready for review

user: str = Field(default=..., description="User to authenticate to the server")
password: Optional[SecretStr] = Field(default=None, description="Password belonging to the username")
private_key: Optional[SecretStr] = Field(default=None, alias="pem_private_key", description="Private key for authentication")
private_key: Optional[SecretStr] = Field(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add private_key as input param for JDBC, as it is not option in Spark JDBC

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

Labels

bug Something isn't working

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

[BUG] get_options() method of SnowflakeBaseModel causes incorrect parameter propagation in SyncTableAndDataFrameSchema

2 participants