mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
init from dbt cloud hosting repo
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
-- IMPORTS
|
||||
WITH notifications AS (
|
||||
SELECT * FROM {{ source('src_exchange_mysql', 'notifications') }}
|
||||
),
|
||||
|
||||
|
||||
-- LOGIC
|
||||
notifications_rename AS (
|
||||
|
||||
SELECT
|
||||
notifications.id,
|
||||
notifications.title,
|
||||
notifications.description,
|
||||
notifications.subject_type,
|
||||
notifications.subject_id,
|
||||
notifications.target_type,
|
||||
notifications.target_id,
|
||||
notifications.causer_type,
|
||||
notifications.causer_id,
|
||||
notifications.status,
|
||||
notifications.deleted_at,
|
||||
notifications.created_at,
|
||||
notifications.updated_at,
|
||||
current_timestamp() AS _dbt_ran_at
|
||||
|
||||
FROM notifications
|
||||
),
|
||||
|
||||
|
||||
-- FINAL
|
||||
final__base_exchange__notifications AS (
|
||||
|
||||
SELECT
|
||||
id,
|
||||
title,
|
||||
description,
|
||||
subject_type,
|
||||
subject_id,
|
||||
target_type,
|
||||
target_id,
|
||||
causer_type,
|
||||
causer_id,
|
||||
status,
|
||||
deleted_at,
|
||||
created_at,
|
||||
updated_at,
|
||||
_dbt_ran_at
|
||||
|
||||
FROM notifications_rename
|
||||
|
||||
)
|
||||
|
||||
SELECT * FROM final__base_exchange__notifications
|
||||
Reference in New Issue
Block a user