Skip to content
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

Hide rows that are unchanged, except for the new columns added? #118

Closed
nickolay opened this issue Sep 9, 2018 · 4 comments
Closed

Hide rows that are unchanged, except for the new columns added? #118

nickolay opened this issue Sep 9, 2018 · 4 comments

Comments

@nickolay
Copy link

nickolay commented Sep 9, 2018

I'm trying to use daff in DW/BI context to control the effects of the changes I make to my SQL code, and I like it -- thanks a lot for making it available!

One thing I'd like to improve is: when I add a new column daff thinks that all rows have changed (because they didn't have a value for the newly added column before). While this makes sense for producing a "strict" patch, which can later be applied, it's not very convenient for my use-case: I'd like to only see the rows that have changes in the common columns.

I'm currently using a little python script, that obtains data to compare via pyodbc, and passes it to daff via PythonTableView. I could implement this logic in my script, but given that daff already compares structure I figured I would ask first if it's possible or would be accepted in daff itself.

@nickolay nickolay changed the title Hide rows that are unchanged, except for the new columns added/removed? Hide rows that are unchanged, except for the new columns added? Sep 9, 2018
@nickolay
Copy link
Author

nickolay commented Sep 9, 2018

Just noticed daff already works the way I want it if the column is deleted.

@paulfitz
Copy link
Owner

Hmm this looks like a missing feature. There is the --act flag, or the acts property of CompareFlags, which can let you selectively report insert/delete/update actions on rows of a table. But it doesn't give you control over what happens when you add an entire column. I think that could be added fairly easily though.

@paulfitz
Copy link
Owner

As of daff 1.3.35, you can use flags.filter("column", false) to remove mass cell insertions. Inserted cells will still be included on rows in the diff for other reasons (via inserts, deletes, updates). Feel free to reopen if you can't get it to do what you want.

@nickolay
Copy link
Author

Wow... thank you! Worked perfectly for me.

(And boy, was it a fast release!)

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

No branches or pull requests

2 participants