More models and knowledge
This commit is contained in:
parent
23a70ed74e
commit
ab581b0fb5
5 changed files with 83 additions and 3 deletions
16
code_thingies/dbtlearn/models/dim/dim_hosts_cleansed.sql
Normal file
16
code_thingies/dbtlearn/models/dim/dim_hosts_cleansed.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
WITH src_hosts AS(
|
||||
SELECT *
|
||||
FROM {{ ref('src_hosts') }}
|
||||
)
|
||||
SELECT
|
||||
host_id,
|
||||
COALESCE(
|
||||
host_name,
|
||||
'Anonymous'
|
||||
) AS host_name,
|
||||
CASE
|
||||
WHEN flag_is_superhost = 't' THEN true
|
||||
WHEN flag_is_superhost = 'f' THEN false
|
||||
END::bool AS flag_is_superhost
|
||||
FROM
|
||||
src_hosts
|
||||
Loading…
Add table
Add a link
Reference in a new issue