Skip to content

Commit

Permalink
Merge pull request #30 from csoule-shaker/snapchat_add_account_info
Browse files Browse the repository at this point in the history
Snapchat add account info
  • Loading branch information
fivetran-joemarkiewicz authored Nov 30, 2021
2 parents 6198075 + 5738776 commit ba5710b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/stg_google_ads.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with base as (
'Google Ads' as platform,
cast(date_day as date) as date_day,
account_name,
{% if var('api_source','adwords') == 'google_ads' %} account_id {% else %} external_customer_id as account_id {% endif %} ,
{% if var('api_source','adwords') == 'google_ads' %} cast(account_id as {{ dbt_utils.type_string() }}) as account_id {% else %} cast(external_customer_id as {{ dbt_utils.type_string() }}) as account_id {% endif %} ,
campaign_name,
cast(campaign_id as {{ dbt_utils.type_string() }}) as campaign_id,
ad_group_name,
Expand Down
4 changes: 3 additions & 1 deletion models/stg_snapchat_ads.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ with base as (
), fields as (

select
ad_account_name as account_name,
cast(ad_account_id as {{ dbt_utils.type_string() }}) as account_id,
cast(date_day as date) as date_day,
base_url,
url_host,
Expand All @@ -26,7 +28,7 @@ with base as (
sum(coalesce(impressions, 0)) as impressions,
sum(coalesce(spend, 0)) as spend
from base
{{ dbt_utils.group_by(14) }}
{{ dbt_utils.group_by(16) }}


)
Expand Down

0 comments on commit ba5710b

Please sign in to comment.