From 4c68df570f646f107e9bcf241d14f8ddc2e7e53e Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Fri, 14 Jun 2024 16:46:28 +0200 Subject: [PATCH] tests --- models/intermediate/cross/schema.yml | 34 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/models/intermediate/cross/schema.yml b/models/intermediate/cross/schema.yml index 5abf39e..5c36af0 100644 --- a/models/intermediate/cross/schema.yml +++ b/models/intermediate/cross/schema.yml @@ -61,11 +61,13 @@ models: - not_null - name: source data_type: text - description: Where is the data coming from. Records that are composed from + description: + Where is the data coming from. Records that are composed from making assumptions on real data will contain `_inferred`. - name: rate_version data_type: text - description: The version of the rate. This can be one of `actual` (the rate is a + description: + The version of the rate. This can be one of `actual` (the rate is a reality fact), `forecast` (the rate sits in the future and is a guess in nature) or `guess` (the rate sits in the past and is a guess in nature). Note that one currency pair can have multiple rate versions @@ -79,12 +81,27 @@ models: - not_null - name: updated_at_utc data_type: timestamp with time zone - description: For external sources, this will be the point in time when the + description: + For external sources, this will be the point in time when the information was obtained from them. For stuff we make up here in the DWH, this will be the point in time when we made the assumption. tests: - not_null - name: int_simple_exchange_rates + description: >- + A simplified vision of exchange rates, derived from + `int_daily_currency_exchange_rates`. Come here if you don't want to + understand nuances and complexities and just want to convert rates. + + The time granularity is daily. Each record holds a currency pair for a + specific day. You will only find one conversion rate per currency pair and + date. + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - from_currency + - to_currency + - rate_date_utc columns: - name: from_currency data_type: character @@ -108,16 +125,9 @@ models: - not_null - name: updated_at_utc data_type: timestamp with time zone - description: For external sources, this will be the point in time when the + description: + For external sources, this will be the point in time when the information was obtained from them. For stuff we make up here in the DWH, this will be the point in time when we made the assumption. tests: - not_null - description: >- - A simplified vision of exchange rates, derived from - `int_daily_currency_exchange_rates`. Come here if you don't want to - understand nuances and complexities and just want to convert rates. - - The time granularity is daily. Each record holds a currency pair for a - specific day. You will only find one conversion rate per currency pair and - date.