Table connects all fields connected to CAMPAIGN
This commit is contained in:
parent
cdf6725c1b
commit
f538d21e6c
22
definitions/staging/CAMPAIGN.sqlx
Normal file
22
definitions/staging/CAMPAIGN.sqlx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
config {
|
||||||
|
type: "view",
|
||||||
|
schema: "pphe_five9_stg",
|
||||||
|
tags: ["snapdaily"],
|
||||||
|
description: "All fields that are connected to the CAMPAIGN"
|
||||||
|
}
|
||||||
|
|
||||||
|
select c.CAMPAIGN,
|
||||||
|
c.CAMPAIGN_ID,
|
||||||
|
cg.campaign_group_id,
|
||||||
|
cgi.campaign_group,
|
||||||
|
cit.CAMPAIGN_TYPE_ID,
|
||||||
|
ct.CAMPAIGN_TYPE
|
||||||
|
from ${ref("stg_MAPPING_CAMPAIGN")} c
|
||||||
|
join ${ref("stg_MAPPING_CAMPAIGN_GROUP")} cg
|
||||||
|
on c.CAMPAIGN_ID = cg.CAMPAIGN_ID
|
||||||
|
join ${ref("stg_MAPPING_CAMPAIGN_GROUP_ID")} cgi
|
||||||
|
on cg.campaign_group_id = cgi.campaign_group_id
|
||||||
|
join ${ref("stg_MAPPING_CAMPAIGN_ID_TYPE")} cit
|
||||||
|
on c.CAMPAIGN_ID = cit.CAMPAIGN_ID
|
||||||
|
join ${ref("stg_MAPPING_CAMPAIGN_TYPE")} ct
|
||||||
|
on ct.CAMPAIGN_TYPE_ID = cit.CAMPAIGN_TYPE_ID
|
||||||
Loading…
Reference in New Issue
Block a user