Merged PR 2074: Adding country to staging
Adding country to staging Related work items: #17312
This commit is contained in:
parent
771b226888
commit
fb86850ffe
3 changed files with 21 additions and 0 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -31,4 +31,5 @@
|
|||
"packages.yml"
|
||||
]
|
||||
},
|
||||
"dbt.prefixGenerateModel": "stg"
|
||||
}
|
||||
|
|
@ -209,3 +209,5 @@ sources:
|
|||
identifier: Accommodation
|
||||
- name: AccommodationToUser
|
||||
identifier: AccommodationToUser
|
||||
- name: Country
|
||||
identifier: Country
|
||||
|
|
|
|||
18
models/staging/core/stg_core__country.sql
Normal file
18
models/staging/core/stg_core__country.sql
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue