wip, but tests are not picked up

This commit is contained in:
Pablo Martin 2024-08-28 17:15:33 +02:00
parent 0137179396
commit 60ae3f2844
2 changed files with 318 additions and 0 deletions

View file

@ -41,3 +41,71 @@ seeds:
min_value: 0
max_value: 8
strictly: False
- name: stg_guest_services_vat_rates_by_country
description: |
A list of applicable VAT rates for guest services, by country.
The list was provided by the Finance team. A value of 0% does not
necessarily mean that the country doesn't have VAT, but rather that we
don't need to charge it to guests from that country.
Country names and codes follow ISO 3166-1. More here: https://en.wikipedia.org/wiki/ISO_3166-1
Read more here: https://www.notion.so/knowyourguest-superhog/Guest-Services-Taxes-How-to-calculate-a5ab4c049d61427fafab669dbbffb3a2?pvs=4
config:
column_types:
country_code: varchar(3)
columns:
- name: country_name,alpha_2,alpha_3,country_code,vat_rate
data_type: character varying
description: The name of the country.
tests:
- not_null
- unique
- name: alpha_2
data_type: character varying
description: |
The two characters ISO 3166-1 Alpha-2 code for the country.
tests:
- not_null
- unique
- dbt_expectations.expect_column_values_to_match_regex:
regex: "^[A-Za-z]{2}$"
- name: alpha_3
data_type: character varying
description: |
The three characters ISO 3166-1 Alpha-3 code for the country.
tests:
- not_null
- unique
- dbt_expectations.expect_column_values_to_match_regex:
regex: "^[A-Za-z]{3}$"
- name: country_code
data_type: character varying
description: |
The three digit ISO 3166-1 Numeric code for the country.
tests:
- not_null
- unique
- dbt_expectations.expect_column_values_to_match_regex:
regex: "^[0-9]{3}$"
- name: vat_rate
data_type: numeric
description: |
The Superhog applicable VAT rate for guests of this country. A value
of 0% does not necessarily mean that the country doesn't have VAT, but
rather that we don't need to charge it to guests from that country.
tests:
- not_null
- unique
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 1
strictly: false