Merged PR 4034: BUGFIX: Ensure id_role are lower case
# Description Ensures `id_role` are lower case. This should avoid issues downstream in dbt tests. # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #26110
This commit is contained in:
parent
3fe9ac140e
commit
33d4f18165
2 changed files with 22 additions and 24 deletions
|
|
@ -1,12 +1,11 @@
|
|||
with source as (
|
||||
select * from {{ source('core', 'Role') }}
|
||||
),
|
||||
stg_core__role as (
|
||||
select
|
||||
{{ adapter.quote("Id") }} as id_role,
|
||||
{{ adapter.quote("Name") }} as role_name,
|
||||
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||
from source
|
||||
)
|
||||
select * from stg_core__role
|
||||
|
||||
with
|
||||
source as (select * from {{ source("core", "Role") }}),
|
||||
stg_core__role as (
|
||||
select
|
||||
lower({{ adapter.quote("Id") }}) as id_role,
|
||||
{{ adapter.quote("Name") }} as role_name,
|
||||
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||
from source
|
||||
)
|
||||
select *
|
||||
from stg_core__role
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
with source as (
|
||||
select * from {{ source('core', 'UserRole') }}
|
||||
),
|
||||
stg_core__user_role as (
|
||||
select
|
||||
lower({{ adapter.quote("UserId") }}) as id_user,
|
||||
{{ adapter.quote("RoleId") }} as id_role,
|
||||
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||
from source
|
||||
)
|
||||
select * from stg_core__user_role
|
||||
|
||||
with
|
||||
source as (select * from {{ source("core", "UserRole") }}),
|
||||
stg_core__user_role as (
|
||||
select
|
||||
lower({{ adapter.quote("UserId") }}) as id_user,
|
||||
lower({{ adapter.quote("RoleId") }}) as id_role,
|
||||
{{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc
|
||||
from source
|
||||
)
|
||||
select *
|
||||
from stg_core__user_role
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue