Table DIGITAL with all data and mappings
This commit is contained in:
parent
643381901f
commit
67f3e0a0a2
46
definitions/staging/stg_DIGITAL.sqlx
Normal file
46
definitions/staging/stg_DIGITAL.sqlx
Normal file
@ -0,0 +1,46 @@
|
||||
config {
|
||||
type: "table",
|
||||
schema: "pphe_five9_stg",
|
||||
assertions: {
|
||||
uniqueKey: ["?"],
|
||||
nonNull: ["?"]
|
||||
},
|
||||
tags: ["daily"],
|
||||
description: "DIGITAL data with mappings"
|
||||
}
|
||||
|
||||
select dl.TIMESTAMP,
|
||||
dl.DATE,
|
||||
dl.HOUR_OF_DAY,
|
||||
dl.MONTH,
|
||||
dl.YEAR,
|
||||
dl.AGENT_ID,
|
||||
dl.AGENT_NAME,
|
||||
a.LANGUAGES,
|
||||
a.CODE LANGUAUGE_ID,
|
||||
a.AGENT_GROUP_ID,
|
||||
dl.AGENT_GROUP,
|
||||
d.DISPOSITION_ID,
|
||||
dl.DISPOSITION,
|
||||
dl.MEDIA_TYPE,
|
||||
m.MEDIA_TYPE_ID,
|
||||
c.CAMPAIGN_ID,
|
||||
dl.CAMPAIGN,
|
||||
c.CAMPAIGN_GROUP_ID,
|
||||
c.CAMPAIGN_GROUP,
|
||||
dl.SKILL,
|
||||
s.SKILL_ID,
|
||||
dl.HANDLE_TIME,
|
||||
dl.TRANSFERS_TO_SKILL,
|
||||
dl.INTERACTIONS
|
||||
from ${ref("stg_DIGITAL_L30D")} dl
|
||||
left join ${ref("stg_AGENT")} a
|
||||
on dl.AGENT_ID = a.AGENT_ID
|
||||
left join ${ref("stg_DISPOSITION")} d
|
||||
on dl.DISPOSITION = d.DISPOSITION
|
||||
left join ${ref("stg_CAMPAIGN")} c
|
||||
on dl.CAMPAIGN = c.CAMPAIGN
|
||||
left join ${ref("stg_MAPPING_SKILL")} s
|
||||
on dl.SKILL = s.SKILL
|
||||
left join ${ref("stg_MAPPING_MEDIA_TYPE")} m
|
||||
on dl.MEDIA_TYPE = m.MEDIA_TYPE
|
||||
Loading…
Reference in New Issue
Block a user