diff --git a/models/intermediate/core/int_core__check_in_hero_users.sql b/models/intermediate/core/int_core__check_in_hero_users.sql index 5399dc4..ef7588e 100644 --- a/models/intermediate/core/int_core__check_in_hero_users.sql +++ b/models/intermediate/core/int_core__check_in_hero_users.sql @@ -1,5 +1,4 @@ {% set api_name = "CHECKINHEROAPI" %} -{% set test_account = "TEST" %} with stg_core__apim_user as (select * from {{ ref("stg_core__apim_user") }}), @@ -28,4 +27,3 @@ inner join and upper(aut.user_type_name) = '{{ api_name }}' inner join stg_core__user u on au.id_apim_user = u.id_user inner join stg_core__currency c on u.id_account_currency = c.id_currency -where upper(au.json_document_user_data ->> 'AccountType') <> '{{ test_account }}' diff --git a/models/intermediate/core/int_core__screen_and_protect_users.sql b/models/intermediate/core/int_core__screen_and_protect_users.sql index bdc05e4..d279445 100644 --- a/models/intermediate/core/int_core__screen_and_protect_users.sql +++ b/models/intermediate/core/int_core__screen_and_protect_users.sql @@ -1,5 +1,4 @@ {% set api_name = "SCREENANDPROTECTAPI" %} -{% set test_account = "TEST" %} with stg_core__apim_user as (select * from {{ ref("stg_core__apim_user") }}), @@ -47,4 +46,3 @@ inner join on au.id_apim_user_type = aut.id_apim_user_type and upper(aut.user_type_name) = '{{ api_name }}' inner join stg_core__user u on au.id_apim_user = u.id_user -where upper(au.json_document_user_data ->> 'AccountType') <> '{{ test_account }}' diff --git a/models/staging/core/stg_core__apim_user.sql b/models/staging/core/stg_core__apim_user.sql index af724d2..6a41a0b 100644 --- a/models/staging/core/stg_core__apim_user.sql +++ b/models/staging/core/stg_core__apim_user.sql @@ -1,3 +1,5 @@ +{% set test_account = "TEST" %} + with raw_apim_user as (select * from {{ source("core", "ApimUser") }}), stg_core__apim_user as ( @@ -15,3 +17,4 @@ with ) select * from stg_core__apim_user +where upper(json_document_user_data ->> 'AccountType') <> '{{ test_account }}'