Set schema. Remove examples.
This commit is contained in:
parent
a8d94ded61
commit
cf93b58092
5 changed files with 22 additions and 55 deletions
|
|
@ -1,27 +0,0 @@
|
|||
|
||||
/*
|
||||
Welcome to your first dbt model!
|
||||
Did you know that you can also configure models directly within SQL files?
|
||||
This will override configurations stated in dbt_project.yml
|
||||
|
||||
Try changing "table" to "view" below
|
||||
*/
|
||||
|
||||
{{ config(materialized='table') }}
|
||||
|
||||
with source_data as (
|
||||
|
||||
select 1 as id
|
||||
union all
|
||||
select null as id
|
||||
|
||||
)
|
||||
|
||||
select *
|
||||
from source_data
|
||||
|
||||
/*
|
||||
Uncomment the line below to remove records with null `id` values
|
||||
*/
|
||||
|
||||
-- where id is not null
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
-- Use the `ref` function to select from other models
|
||||
|
||||
select *
|
||||
from {{ ref('my_first_dbt_model') }}
|
||||
where id = 1
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: my_first_dbt_model
|
||||
description: "A starter dbt model"
|
||||
columns:
|
||||
- name: id
|
||||
description: "The primary key for this table"
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- name: my_second_dbt_model
|
||||
description: "A starter dbt model"
|
||||
columns:
|
||||
- name: id
|
||||
description: "The primary key for this table"
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
21
models/staging/schema.yml
Normal file
21
models/staging/schema.yml
Normal 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
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue