-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Schema is not retaining the correct column order #73
Conversation
For my own future reference, I could have more quickly run my updated tests by doing:
Running all tests requires the build of a database (as supplied by the docker image in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mjsqu ,
I have reviewed the changes and like what you have done - thank you 🥇 .
My testing included.
- Peer Review of the code
- Compare the discovery of the schema (current vs PR)
- Compare the column ordering of loaded data in target-snowflake (current vs PR)
- Compare the content diff of result in target-snowflake (current vs PR).
All passed successfully.
Could we add the following changes however.
- Update the .bumpversion.cfg with new version
- Update the pyproject.toml with new version
- Update the CHANGELOG.md with description of latest version / change.
- Rebuild the pyproject lockfile 👍
poetry lock --no-update
Thank you.
These are done:
I ran |
Thank you for adding the version updates. Change approved. Thank you. |
Fixes #62 by refactoring the
desired_columns
function to use lists instead of sets as they preserve order. List comprehensions are used to filter the lists rather than a loop. Operations such as intersection, difference and union are also replaced with list comprehensions.Also includes modifications to the existing
TestSelectsAppropriateColumns
:Adds new test
TestInvalidInclusion
which tests that an exception is raised when aninclusion
value of "invalid" is supplied, which is not one of the valid values: