Merged PR 2539: Claim model to staging
# Description Brings over the table `Claim` from `sync_core` to `staging`. # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [X] I have checked for DRY opportunities with other models and docs. - [X] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #19570
This commit is contained in:
commit
6c77eed984
3 changed files with 23 additions and 1 deletions
|
|
@ -219,3 +219,5 @@ sources:
|
||||||
identifier: UserRole
|
identifier: UserRole
|
||||||
- name: Role
|
- name: Role
|
||||||
identifier: Role
|
identifier: Role
|
||||||
|
- name: Claim
|
||||||
|
identifier: Claim
|
||||||
|
|
|
||||||
|
|
@ -153,4 +153,10 @@ models:
|
||||||
- not_null
|
- not_null
|
||||||
- name: id_user
|
- name: id_user
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
- name: stg_core__claim
|
||||||
|
columns:
|
||||||
|
- name: id_claim
|
||||||
|
tests:
|
||||||
|
- unique
|
||||||
|
- not_null
|
||||||
|
|
|
||||||
14
models/staging/core/stg_core__claim.sql
Normal file
14
models/staging/core/stg_core__claim.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
with
|
||||||
|
raw_claim as (select * from {{ source("core", "Claim") }}),
|
||||||
|
stg_core__claim as (
|
||||||
|
select
|
||||||
|
{{ adapter.quote("Id") }} as id_claim,
|
||||||
|
{{ adapter.quote("UserId") }} as id_user,
|
||||||
|
{{ adapter.quote("ClaimType") }} as claim_type,
|
||||||
|
{{ adapter.quote("ClaimValue") }} as claim_value,
|
||||||
|
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||||
|
|
||||||
|
from raw_claim
|
||||||
|
)
|
||||||
|
select *
|
||||||
|
from stg_core__claim
|
||||||
Loading…
Add table
Add a link
Reference in a new issue