From ac6e886510591cb1fc07d6b17f0071a83035a2f3 Mon Sep 17 00:00:00 2001 From: Claire Carroll Date: Thu, 26 Sep 2019 19:31:57 -0400 Subject: [PATCH] Update README [skip ci] --- README.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index aeda1c5a..43936ff8 100644 --- a/README.md +++ b/README.md @@ -94,13 +94,9 @@ Super similar to `compare_relations`, except it takes two select statements. Thi ``` ## compare_column_values ([source](macros/compare_column_values.sql)) -This macro is useful when: -* You've used the `compare_queries` macro (above) and found that a significant -number of your records don't match. -* So now you want to check if a particular column is problematic. - -This macro will return a query, that, when executed, summarizes the number of -records that match perfectly: +This macro will return a query, that, when executed, compares a column across +two queries, and summarizes which records match perfectly for a given primary +key: | match_status | count | | --------------------------- | ------ | @@ -111,11 +107,15 @@ records that match perfectly: | 🤷: value is null in b only | 73 | | 🙅: ‍values do not match | 4,064 | +This macro is useful when: +* You've used the `compare_queries` macro (above) and found that a significant +number of your records don't match. +* So now you want to find which column is causing most of these discrepancies. + ### Usage: ``` {# in dbt Develop #} - {% set old_etl_relation_query %} select * from public.dim_product where is_latest @@ -178,11 +178,6 @@ like this: This will give you an output like: ``` -| match_status | count | -| ----------------- | ------ | -| ✅: perfect match | 41,785 | -| 🤷: missing from b | 26 | - Comparing column "name" | match_status | count | | -------------------- | ------ |