From 662c7b8ba85f7b064c85259aa4f229558d656bec Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 18 Jun 2024 11:35:07 +0200 Subject: [PATCH] remove hardcoded rates and seed, remove docs --- ...nt_hardcoded_historical_currency_rates.sql | 7 -- seeds/schema.yaml | 39 ----------- seeds/stg_seed__hardcoded_currency_rates.csv | 65 ------------------- 3 files changed, 111 deletions(-) delete mode 100644 models/intermediate/cross/int_hardcoded_historical_currency_rates.sql delete mode 100644 seeds/stg_seed__hardcoded_currency_rates.csv diff --git a/models/intermediate/cross/int_hardcoded_historical_currency_rates.sql b/models/intermediate/cross/int_hardcoded_historical_currency_rates.sql deleted file mode 100644 index 8e6d81e..0000000 --- a/models/intermediate/cross/int_hardcoded_historical_currency_rates.sql +++ /dev/null @@ -1,7 +0,0 @@ -with - hardcoded_rates as (select * from {{ ref("stg_seed__hardcoded_currency_rates") }}), - dates as (select * from {{ ref("int_dates") }}) -select d.date_day as rate_date, r.* -from dates d -cross join hardcoded_rates r -where d.date_day > cast({{ var("start_date") }} as date) diff --git a/seeds/schema.yaml b/seeds/schema.yaml index 14e0f50..d23489c 100644 --- a/seeds/schema.yaml +++ b/seeds/schema.yaml @@ -41,42 +41,3 @@ seeds: min_value: 0 max_value: 8 strictly: False - - name: stg_seed__hardcoded_currency_rates - description: | - A bunch of rates between currencies, taken from our invoicing cycle in February 2024. - - These are hardcoded and so will become outdated, but it's the best we have now since we don't have a live feed for exchange rates. - config: - column_types: - from_currency: varchar(3) - to_currency: varchar(3) - rate: numeric - columns: - - name: from_currency - data_type: character varying - description: The 3 character ISO 4217 code for the base currency, in Uppercase. - tests: - - not_null - - dbt_expectations.expect_column_values_to_match_regex: - regex: "^[A-Z]{3}$" - columns: - - name: to_currency - data_type: character varying - description: The 3 character ISO 4217 code for the target currency, in Uppercase. - tests: - - not_null - - dbt_expectations.expect_column_values_to_match_regex: - regex: "^[A-Z]{3}$" - - name: rate - data_type: numeric - description: | - The rate between the two currencies. You should read it as the amount of target currency you get for each unit of base currency. - - For example: for the combination EUR-GBP, a rate of 0.8 means you get 0.8 GBP for 1 EUR. - - Rates between same-currency pairs are always one. - tests: - - not_null - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0.00000000001 - max_value: 999999999999 diff --git a/seeds/stg_seed__hardcoded_currency_rates.csv b/seeds/stg_seed__hardcoded_currency_rates.csv deleted file mode 100644 index 3d60fb0..0000000 --- a/seeds/stg_seed__hardcoded_currency_rates.csv +++ /dev/null @@ -1,65 +0,0 @@ -from_currency,to_currency,rate -EUR,EUR,1 -USD,USD,1 -GBP,GBP,1 -CAD,CAD,1 -AUD,AUD,1 -ZAR,ZAR,1 -NZD,NZD,1 -PLN,PLN,1 -EUR,USD,1.08286 -EUR,GBP,0.85555 -EUR,CAD,1.4688 -EUR,AUD,1.66453 -EUR,ZAR,20.7993 -EUR,NZD,1.77391 -EUR,PLN,4.31113 -USD,EUR,0.92335 -USD,GBP,0.79003 -USD,CAD,1.3564 -USD,AUD,1.53701 -USD,ZAR,19.2073 -USD,NZD,1.63816 -USD,PLN,3.98085 -GBP,EUR,1.16864 -GBP,USD,1.26559 -GBP,CAD,1.71664 -GBP,AUD,1.94522 -GBP,ZAR,24.3085 -GBP,NZD,2.07323 -GBP,PLN,5.03811 -NZD,EUR,0.56352 -NZD,USD,0.6103 -NZD,GBP,0.48216 -NZD,CAD,0.82781 -NZD,AUD,0.9381 -NZD,ZAR,11.7222 -NZD,PLN,2.42951 -CAD,EUR,0.68064 -CAD,USD,0.73714 -CAD,GBP,0.58237 -CAD,AUD,1.133 -CAD,ZAR,14.1585 -CAD,NZD,1.20756 -CAD,PLN,2.93446 -AUD,EUR,0.60068 -AUD,USD,0.65049 -AUD,GBP,0.51391 -AUD,CAD,0.88232 -AUD,ZAR,12.4941 -AUD,NZD,1.06572 -AUD,PLN,2.58949 -ZAR,EUR,0.04804 -ZAR,USD,0.05203 -ZAR,GBP,0.0411 -ZAR,CAD,0.07057 -ZAR,AUD,0.07997 -ZAR,NZD,0.08523 -ZAR,PLN,0.20712 -PLN,EUR,0.23184 -PLN,USD,0.25106 -PLN,GBP,0.19835 -PLN,CAD,0.34054 -PLN,AUD,0.38588 -PLN,ZAR,4.82218 -PLN,NZD,0.41128