diff --git a/dbt/models/iasworld/schema.yml b/dbt/models/iasworld/schema.yml index 4d98fe8bb..62f8d290e 100644 --- a/dbt/models/iasworld/schema.yml +++ b/dbt/models/iasworld/schema.yml @@ -30,6 +30,20 @@ sources: filter: &latest_taxyr taxyr >= date_format(current_date - interval '1' year, '%Y') warn_after: &24_hours {count: 24, period: hour} error_after: &48_hours {count: 48, period: hour} + tests: + - unique_combination_of_columns: + name: asmt_all_unique_by_parid_procname_and_taxyr + combination_of_columns: + - parid + - procname + - taxyr + config: + where: >- + cur = 'Y' and + deactivat is null and + procname in ('CCAOVALUE', 'CCAOFINAL', 'BORVALUE') and + valclass is null + error_if: ">125" - name: asmt_hist - name: cname - name: comdat @@ -73,6 +87,17 @@ sources: filter: *latest_taxyr warn_after: *24_hours error_after: *48_hours + tests: + - unique_combination_of_columns: + name: htpar_unique_by_parid_caseno_taxyr_subkey + combination_of_columns: + - parid + - caseno + - taxyr + - subkey + config: + where: cur = 'Y' and deactivat is null + error_if: ">2" - name: land description: '{{ doc("land") }}' tests: @@ -89,7 +114,7 @@ sources: name: legdat_unique_by_parid_taxyr combination_of_columns: - parid - - taxyr + - taxyr - name: lpmod - name: lpnbhd - name: oby @@ -109,7 +134,7 @@ sources: name: owndat_unique_by_parid_taxyr combination_of_columns: - parid - - taxyr + - taxyr - name: pardat description: '{{ doc("pardat") }}' tests: @@ -117,7 +142,7 @@ sources: name: pardat_unique_by_parid_taxyr combination_of_columns: - parid - - taxyr + - taxyr - name: permit freshness: filter: date_format(date_parse(permdt, '%Y-%m-%d %H:%i:%s.0'), '%Y') >= date_format(current_date - interval '1' year, '%Y') @@ -125,5 +150,13 @@ sources: error_after: &72_hours {count: 72, period: hour} - name: rcoby - name: sales + tests: + - unique_combination_of_columns: + name: sales_unique_by_parid_instruno + combination_of_columns: + - parid + - instruno + config: + where: substr(saledt, 1, 4) >= '2023' - name: splcom - name: valclass