Merged PR 2074: Adding country to staging

Adding country to staging

Related work items: #17312
This commit is contained in:
Oriol Roqué Paniagua 2024-06-19 08:40:08 +00:00
parent 771b226888
commit fb86850ffe
3 changed files with 21 additions and 0 deletions

View file

@ -31,4 +31,5 @@
"packages.yml"
]
},
"dbt.prefixGenerateModel": "stg"
}

View file

@ -209,3 +209,5 @@ sources:
identifier: Accommodation
- name: AccommodationToUser
identifier: AccommodationToUser
- name: Country
identifier: Country

View file

@ -0,0 +1,18 @@
with raw_country as (
select * from {{ source('core', 'Country') }}
),
stg_core__country as (
select
{{ adapter.quote("Id") }} as id_country,
{{ adapter.quote("Iso") }} as iso_2,
{{ adapter.quote("Iso3") }} as iso_3,
{{ adapter.quote("Name") }} as country_name,
{{ adapter.quote("NumCode") }} as iso_num_code,
{{ adapter.quote("PhoneCode") }} as phone_code,
{{ adapter.quote("PreferredCurrencyId") }} as id_preferred_currency,
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
from raw_country
)
select * from stg_core__country