-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
379 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% macro country_normalization(raw_country_name) %} | ||
case | ||
when lower({{raw_country_name }}) in ('åland') then 'åland islands' | ||
when lower({{raw_country_name }}) in ('brunei') then 'brunei darussalam' | ||
when lower({{raw_country_name }}) in ('cape verde') then 'cabo verde' | ||
when lower({{raw_country_name }}) in ('cocos [keeling] islands') then 'cocos (keeling) islands' | ||
when lower({{raw_country_name }}) in ('dr congo','congo','congo, the democratic republic of the') then 'congo, democratic republic of' | ||
when lower({{raw_country_name }}) in ('republic of the congo','congo republic') then 'congo, republic of' | ||
when lower({{raw_country_name }}) in ('ivory coast','cote d''ivoire') then 'côte d''ivoire' | ||
when lower({{raw_country_name }}) in ('czech republic') then 'czechia' | ||
when lower({{raw_country_name }}) in ('swaziland') then 'eswatini' | ||
when lower({{raw_country_name }}) in ('iran, islamic republic of') then 'iran' | ||
when lower({{raw_country_name }}) in ('hashemite kingdom of jordan') then 'jordan' | ||
when lower({{raw_country_name }}) in ('lao people''s democratic republic') then 'laos' | ||
when lower({{raw_country_name }}) in ('republic of lithuania') then 'lithuania' | ||
when lower({{raw_country_name }}) in ('macau') then 'macao' | ||
when lower({{raw_country_name }}) in ('federated states of micronesia') then 'micronesia, federated states of' | ||
when lower({{raw_country_name }}) in ('republic of moldova','moldova') then 'moldova, republic of' | ||
when lower({{raw_country_name }}) in ('principality of monaco') then 'monaco' | ||
when lower({{raw_country_name }}) in ('myanmar [burma]') then 'myanmar' | ||
when lower({{raw_country_name }}) in ('the netherlands') then 'netherlands' | ||
when lower({{raw_country_name }}) in ('korea, democratic people''s republic of') then 'north korea' | ||
when lower({{raw_country_name }}) in ('macedonia') then 'north macedonia' | ||
when lower({{raw_country_name }}) in ('palestinian territory') then 'palestine' | ||
when lower({{raw_country_name }}) in ('russian federation') then 'russia' | ||
when lower({{raw_country_name }}) in ('saint-barthélemy','saint-barthélemy') then 'saint barthélemy' | ||
when lower({{raw_country_name }}) in ('saint helena') then 'saint helena, ascension, and tristan da cunha' | ||
when lower({{raw_country_name }}) in ('st kitts and nevis') then 'saint kitts and nevis' | ||
when lower({{raw_country_name }}) in ('st vincent and grenadines') then 'saint vincent and the grenadines' | ||
when lower({{raw_country_name }}) in ('sao tome and principe') then 'são tomé and príncipe' | ||
when lower({{raw_country_name }}) in ('slovak republic') then 'slovakia' | ||
when lower({{raw_country_name }}) in ('republic of korea', 'korea, republic of') then 'south korea' | ||
when lower({{raw_country_name }}) in ('syrian arab republic') then 'syria' | ||
when lower({{raw_country_name }}) in ('tanzania, united republic of') then 'tanzania' | ||
when lower({{raw_country_name }}) in ('democratic republic of timor-leste','east timor') then 'timor-leste' | ||
when lower({{raw_country_name }}) in ('turkey') then 'türkiye' | ||
when lower({{raw_country_name }}) in ('u.s. minor outlying islands') then 'united states minor outlying islands' | ||
when {{raw_country_name}} = '' then NULL | ||
else lower({{raw_country_name }}) | ||
end | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* Author: Cory | ||
Date: 2024-11-30 | ||
Description: ISO Codes and regions for use by the Global team*/ | ||
|
||
select * from | ||
{{ref('seed_country_iso_metadata')}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters