Set schema. Remove examples.

This commit is contained in:
Pablo Martin 2024-01-18 14:32:20 +01:00
parent a8d94ded61
commit cf93b58092
5 changed files with 22 additions and 55 deletions

21
models/staging/schema.yml Normal file
View file

@ -0,0 +1,21 @@
version: 2
models:
- name: stg_core_user
description: "The staging version of Core's User table. Do not confuse with SuperhogUser."
columns:
- name: id_user
description: "The primary key for this table"
tests:
- unique
- not_null
- name: stg_core_superhog_user
description: "The staging version of Core's SuperhogUser table. Do not confuse with User."
columns:
- name: id_superhoguser
description: "The primary key for this table"
tests:
- unique
- not_null

View file

@ -1,5 +1,6 @@
with raw_superhog_user as (select * from {{ source("core", "superhog_user") }})
select
cast(superhoguserid as uuid) as id_superhoguser,
avatar as avatar,
airbnbid as id_airbnb,
airbnburl as airbnb_url,
@ -7,7 +8,6 @@ select
updateddate as updated_date_utc,
verifieddate as verified_date_utc,
flagasproblem as flag_as_problem,
cast(superhoguserid as uuid) as id_superhoguser,
numberofproperties as number_of_properties,
superhogverifiedsetid as id_superhog_verified_set,
platformcommsrecipient as platform_comms_recipient,