-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Add filter to show records with duplicate values in a set of columns #501
Comments
I think that simply finding the rows that have duplicate values should probably be its own issue in the backend. It will be a bit complex (the best way I know of involves a window function at the DB level). |
@mathemancer It seems fairly simple according to this Stack Overflow answer: https://stackoverflow.com/questions/2594829/finding-duplicate-values-in-a-sql-table. Do you see any issues with the recommended approach? |
The problem with the queries from that post will be that you won't be able to
In the case where we want to find entire rows that are duplicates (shouldn't happen for tables with |
@mathemancer Thanks! I created a separate DB issue. |
What should the actual interface for this look like? Is setting |
@eito-fis I think it should be a filter like everything else, it should just be another type of filter. I think currently those are being passed in as a |
@kgodey I initially didn't think |
@kgodey Having gotten started, I'm again unsure on how to implement this. I think the core issue is that all of the currently supported filtering parameters are things that could fit inside of a To support the duplication filter in the nested structure we could:
If we don't need the nested interactions, I think a separate If we did want to be able to use conjunctions, I think having Sorry - this got a bit longer than expected. I guess the core question is - do we need to be able to handle the |
If it's easier to do a single top level condition (which it sounds like it is), let's do that. We can refactor if needed when we are finalizing our API v1 structure. |
@kgodey as a separate parameter, or as part of the filters? |
If it's the same effort to implement, let's make it part of the filters. |
I think I had 'fixes' instead of 'Fixes' ): |
@eito-fis You had both issues comma separated (Fixes A, B), you need to have "fixes A, fixes B". |
Problem
The "Working with Columns" design spec adds a filter for duplicate values for a column, to assist users with resolving non-unique values when they want to set a unique constraint for a column.
Proposed solution
We need to add a filter for this to our Record API filters.
Additional context
sqlalchemy-filters
to provide filtering. See: https://github.com/centerofci/sqlalchemy-filters.The text was updated successfully, but these errors were encountered: