Addressed comments
This commit is contained in:
parent
a4b16e7410
commit
cab300f7dd
2 changed files with 7 additions and 4 deletions
|
|
@ -1,12 +1,10 @@
|
||||||
with
|
with
|
||||||
stg_core__user as (select * from {{ ref("stg_core__user") }}),
|
stg_core__user as (select * from {{ ref("stg_core__user") }}),
|
||||||
stg_core__verification_set as (
|
stg_core__verification_set as (
|
||||||
select id_user_host, id_verification_set, is_active
|
select * from {{ ref("stg_core__verification_set") }}
|
||||||
from {{ ref("stg_core__verification_set") }}
|
|
||||||
),
|
),
|
||||||
stg_core__verification_set_to_verification_type as (
|
stg_core__verification_set_to_verification_type as (
|
||||||
select id_verification_set, id_verification_type
|
select * from {{ ref("stg_core__verification_set_to_verification_type") }}
|
||||||
from {{ ref("stg_core__verification_set_to_verification_type") }}
|
|
||||||
),
|
),
|
||||||
hosts_with_check_in_cover as (
|
hosts_with_check_in_cover as (
|
||||||
select vs.id_user_host
|
select vs.id_user_host
|
||||||
|
|
@ -15,6 +13,8 @@ with
|
||||||
stg_core__verification_set_to_verification_type vstvt
|
stg_core__verification_set_to_verification_type vstvt
|
||||||
on vs.id_verification_set = vstvt.id_verification_set
|
on vs.id_verification_set = vstvt.id_verification_set
|
||||||
where vs.is_active is true and vstvt.id_verification_type = 15
|
where vs.is_active is true and vstvt.id_verification_type = 15
|
||||||
|
-- vs.isactive is to consider the current verification set used by the host
|
||||||
|
-- vstvt.id_verification_type = 15 is the value for check_in_cover verification
|
||||||
)
|
)
|
||||||
select
|
select
|
||||||
u.id_user,
|
u.id_user,
|
||||||
|
|
|
||||||
|
|
@ -819,6 +819,9 @@ models:
|
||||||
description:
|
description:
|
||||||
This model contains information about hosts that offer check in cover.
|
This model contains information about hosts that offer check in cover.
|
||||||
It has basic information on the users like name, phone, email or joined date.
|
It has basic information on the users like name, phone, email or joined date.
|
||||||
|
|
||||||
|
This model is restricted to active user so it doesn't include historical data
|
||||||
|
like users that had check-in cover but are currently inactive.
|
||||||
columns:
|
columns:
|
||||||
- name: id_user
|
- name: id_user
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue