mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
40 lines
650 B
SQL
40 lines
650 B
SQL
-- IMPORTS
|
|
WITH roles AS (
|
|
SELECT * FROM {{ source('src_exchange_mysql', 'roles') }}
|
|
),
|
|
|
|
|
|
-- LOGIC
|
|
roles_rename AS (
|
|
|
|
SELECT
|
|
roles.id,
|
|
roles.name,
|
|
roles.guard_name,
|
|
roles.type,
|
|
roles.created_at,
|
|
roles.updated_at,
|
|
current_timestamp() AS _dbt_ran_at
|
|
|
|
FROM roles
|
|
|
|
),
|
|
|
|
|
|
-- FINAL
|
|
final__base_exchange__roles AS (
|
|
|
|
SELECT
|
|
id,
|
|
name,
|
|
guard_name,
|
|
type,
|
|
created_at,
|
|
updated_at,
|
|
_dbt_ran_at
|
|
|
|
FROM roles_rename
|
|
|
|
)
|
|
|
|
SELECT * FROM final__base_exchange__roles |