commit wip
This commit is contained in:
parent
e406bc89ad
commit
84f2156c99
1 changed files with 20 additions and 0 deletions
20
models/intermediate/cross/int_deal_id_consolidation.sql
Normal file
20
models/intermediate/cross/int_deal_id_consolidation.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
with
|
||||
int_xero__contacts as (select * from {{ ref("int_xero__contacts") }}),
|
||||
int_core__unified_user as (select * from {{ ref("int_core__unified_user") }}),
|
||||
int_hubspot__deal as (select * from {{ ref("int_hubspot__deal") }})
|
||||
|
||||
select 'core' as source, id_deal, company_name as deal_name
|
||||
from int_core__unified_user
|
||||
where id_deal is not null
|
||||
|
||||
union all
|
||||
|
||||
select 'hubspot' as source, id_deal, deal_name
|
||||
from int_hubspot__deal
|
||||
where id_deal is not null
|
||||
|
||||
union all
|
||||
|
||||
select 'xero' as source, id_deal, contact_name as deal_name
|
||||
from int_xero__contacts
|
||||
where id_deal is not null
|
||||
Loading…
Add table
Add a link
Reference in a new issue