From 51b86aeb5d7683e59f26f4faf3659737c1106c65 Mon Sep 17 00:00:00 2001 From: Maria Lorena Rodriguez Viruel Date: Tue, 7 Nov 2023 14:08:49 -0300 Subject: [PATCH] Add audit_helper dependency and create first audit model --- .../impact/PNC/impact_pncview_visit_audit.sql | 26 +++++++++++++++++++ packages.yml | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 models/brac/impact/PNC/impact_pncview_visit_audit.sql diff --git a/models/brac/impact/PNC/impact_pncview_visit_audit.sql b/models/brac/impact/PNC/impact_pncview_visit_audit.sql new file mode 100644 index 00000000..dcbdbd51 --- /dev/null +++ b/models/brac/impact/PNC/impact_pncview_visit_audit.sql @@ -0,0 +1,26 @@ +{# in dbt Develop #} + + +{% set old_useview_postnatal_care %} +select + uuid, + patient_id, + form +from dbt.useview_postnatal_care +{% endset %} + + +{% set new_impact_pncview_visit %} +select + uuid, + patient_id, + form +from {{ ref("impact_pncview_visit") }} +{% endset %} + + +{{ audit_helper.compare_queries( + a_query=old_useview_postnatal_care, + b_query=new_impact_pncview_visit, + primary_key="uuid" +) }} diff --git a/packages.yml b/packages.yml index 8bb89f3f..21598036 100644 --- a/packages.yml +++ b/packages.yml @@ -3,3 +3,5 @@ packages: version: 1.1.1 - package: calogica/dbt_date version: 0.9.1 + - package: dbt-labs/audit_helper + version: 0.9.0