diff --git a/definitions/staging/stg_CAMPAIGN.sqlx b/definitions/staging/stg_CAMPAIGN.sqlx index 84c64a2..9a2baee 100644 --- a/definitions/staging/stg_CAMPAIGN.sqlx +++ b/definitions/staging/stg_CAMPAIGN.sqlx @@ -12,11 +12,11 @@ select c.CAMPAIGN, cit.CAMPAIGN_TYPE_ID, ct.CAMPAIGN_TYPE from ${ref("stg_MAPPING_CAMPAIGN")} c -join ${ref("stg_MAPPING_CAMPAIGN_GROUP")} cg +left join ${ref("stg_MAPPING_CAMPAIGN_GROUP")} cg on c.CAMPAIGN_ID = cg.CAMPAIGN_ID -join ${ref("stg_MAPPING_CAMPAIGN_GROUP_ID")} cgi +left 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 +left join ${ref("stg_MAPPING_CAMPAIGN_ID_TYPE")} cit on c.CAMPAIGN_ID = cit.CAMPAIGN_ID -join ${ref("stg_MAPPING_CAMPAIGN_TYPE")} ct +left join ${ref("stg_MAPPING_CAMPAIGN_TYPE")} ct on ct.CAMPAIGN_TYPE_ID = cit.CAMPAIGN_TYPE_ID \ No newline at end of file