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

Add optional exclude_columns to the equality test #828

Closed
seub opened this issue Aug 30, 2023 · 3 comments · Fixed by #765
Closed

Add optional exclude_columns to the equality test #828

seub opened this issue Aug 30, 2023 · 3 comments · Fixed by #765
Labels
enhancement New feature or request

Comments

@seub
Copy link

seub commented Aug 30, 2023

Describe the feature

It'd be nice to have an optional exclude_columns in the equality test, similar to compare_columns:

    tests:
      - dbt_utils.equality:
          compare_model: ref('other_table_name')
          exclude_columns:
            - third_column
            - fourth_column

Such columns would be ignored when comparing the two tables.

Describe alternatives you've considered

  1. Rewrite the test in our projects
  2. Somehow leverage compare_relations from dbt-audit-helper

I don't think either solution is great compared to adding the feature here.

Additional context / Who will this benefit?

As an example, here's why my team would like this. We leverage the equality test from dbt-utils to implement unit tests. However, we need to exclude the "processing timestamp" column, as it cannot be predicted for the "expected output" model.

Are you interested in contributing this feature?

Yep! In fact, I wrote the PR (#829 ) before the issue, because I'd forgotten that all PRs must be associated with an issue, oops.

@seub seub added enhancement New feature or request triage labels Aug 30, 2023
@seub seub mentioned this issue Aug 30, 2023
17 tasks
Copy link

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 27, 2024
Copy link

github-actions bot commented Mar 5, 2024

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@dbeatty10 dbeatty10 removed the Stale label Apr 18, 2024
@dbeatty10 dbeatty10 reopened this Apr 18, 2024
@seub
Copy link
Author

seub commented Apr 22, 2024

Hi @dbeatty10 , thank you for re-opening this PR.

However I think it can be closed, given that this other PR was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants