-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for redshift in attribution model (#394)
* support for redshift in attribution model * corrections as per reviews
- Loading branch information
Showing
6 changed files
with
247 additions
and
992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
inputs: | ||
- name: ga_campaign_stats | ||
app_defaults: | ||
table: dev.attribution_data.google_ads_campaign_stats | ||
occurred_at_col: _FIVETRAN_SYNCED | ||
ids: | ||
- select: id | ||
type: campaign_id | ||
entity: campaign | ||
to_default_stitcher: false | ||
- name: lkdn_ad_analytic_campaign | ||
app_defaults: | ||
table: dev.attribution_data.linkedin_ads_ad_analytics_by_campaign | ||
occurred_at_col: _FIVETRAN_SYNCED | ||
ids: | ||
- select: campaign_id | ||
type: campaign_id | ||
entity: campaign | ||
to_default_stitcher: false | ||
- name: fb_basic_campaign | ||
app_defaults: | ||
table: dev.attribution_data.facebook_ads_basic_campaign | ||
occurred_at_col: _FIVETRAN_SYNCED | ||
ids: | ||
- select: campaign_id | ||
type: campaign_id | ||
entity: campaign | ||
to_default_stitcher: false | ||
- select: lower(campaign_name) | ||
type: campaign_name | ||
entity: campaign | ||
to_default_stitcher: false | ||
models: | ||
- name: campaign_id_graph | ||
model_type: id_stitcher | ||
model_spec: | ||
validity_time: 24h # 1 day | ||
entity_key: campaign | ||
edge_sources: | ||
- from: inputs/ga_campaign_stats | ||
- from: inputs/lkdn_ad_analytic_campaign | ||
- from: inputs/fb_basic_campaign | ||
- from: inputs/rsMarketingPages | ||
var_groups: | ||
- name: campaign_vars | ||
entity_key: campaign | ||
vars: | ||
- entity_var: | ||
name: campaign_start_date | ||
select: DATE '2023-02-01' | ||
is_feature: false | ||
- entity_var: | ||
name: campaign_end_date | ||
select: DATE '2024-06-01' | ||
is_feature: false | ||
- entity_var: | ||
name: fb_ads_conversions_value | ||
select: CAST((RANDOM()*49) + 1 AS INT) | ||
is_feature: false | ||
- entity_var: | ||
name: google_ads_utm_campaign | ||
select: case when RANDOM()>0.5 then 1 else 0 end | ||
is_feature: false | ||
- entity_var: | ||
name: fb_ads_impressions | ||
select: CAST((RANDOM()*10) + 1 AS INT) | ||
is_feature: false | ||
- entity_var: | ||
name: fb_ads_conversions | ||
select: case when RANDOM()>0.5 then 5 else 2 end | ||
is_feature: false | ||
- entity_var: | ||
name: google_ads_clicks | ||
select: CAST((RANDOM()*15) + 1 AS INT) | ||
is_feature: false |
Oops, something went wrong.