dbt-labs / dbt-audit-helper

Useful macros when performing data audits
https://hub.getdbt.com/dbt-labs/audit_helper/latest/
Apache License 2.0
329 stars 40 forks source link

Add `compare_which_columns_differ` #92

Closed dave-connors-3 closed 8 months ago

dave-connors-3 commented 8 months ago

Description & motivation

This PR adds a new detect_column_changes to help quickly identify which columns have any value-level changes to help narrow down which columns need attention when tracking down differences between two relations.

Checklist

graciegoheen commented 8 months ago

Naming ideas:

I'll keep brainstorming.... @dbeatty10 @joellabes lmk if y'all have any ideas!

I'd like the naming to make it clear that:

On a separate note, I find some of the macro names in this package confusing - would be lovely to spruce up some of the docs so it's clear how each of these are unique (out of scope of this PR):

joellabes commented 8 months ago

I like identify_columns_with_differences, although that might imply it only returns the mismatching columns? Maybe like identify_column_difference_statuses?

joellabes commented 8 months ago

(Swapped my request changes for an approval so you can merge without a second review once you've changed it (or proved that the extra brackets aren't needed))