Skip to content

Commit

Permalink
Merge pull request #26 from fivetran/bugfix/email_send_idi
Browse files Browse the repository at this point in the history
Bugfix/email send idi
  • Loading branch information
fivetran-reneeli authored Aug 24, 2022
2 parents afdceed + 19c0193 commit 2b66fcf
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# dbt_marketo_source v0.7.2
## Bug Fixes
- Updated surrogate key `email_send_id` to include `primary_attribute_value_id`. The previous key was at a campaign level grain, not an email level grain. This is pertinent in the case where there are multiple emails that are part of the same campaign.
[#26](https://github.com/fivetran/dbt_marketo_source/pull/26)
## Contributors
- [sfc-gh-sugupta](https://github.com/sfc-gh-sugupta) [#25](https://github.com/fivetran/dbt_marketo_source/issues/25)
# dbt_marketo_source v0.7.1

## Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'marketo_source'
version: '0.7.1'
version: '0.7.2'
config-version: 2
require-dbt-version: [">=1.0.0", "<2.0.0"]

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'marketo_source_integration_tests'
version: '0.7.1'
version: '0.7.2'
profile: 'integration_tests'
config-version: 2

Expand Down
12 changes: 6 additions & 6 deletions models/stg_marketo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ models:
description: The URL of the link clicked.

- name: email_send_id
description: The inferred ID for the email sent.
description: The inferred ID for the email sent. This is created by concatenating primary_attribute_value_id, campaign_id, campaign_run_id, and lead_id.

- name: email_template_id
description: The ID of the email's template.
Expand Down Expand Up @@ -136,7 +136,7 @@ models:
description: The email address that bounced.

- name: email_send_id
description: The inferred ID for the email sent.
description: The inferred ID for the email sent. This is created by concatenating primary_attribute_value_id, campaign_id, campaign_run_id, and lead_id.

- name: email_template_id
description: The ID of the email's template.
Expand Down Expand Up @@ -177,7 +177,7 @@ models:
description: The choice number of the current step that triggered the activity.

- name: email_send_id
description: The inferred ID for the email sent.
description: The inferred ID for the email sent. This is created by concatenating primary_attribute_value_id, campaign_id, campaign_run_id, and lead_id.

- name: email_template_id
description: The ID of the email's template.
Expand Down Expand Up @@ -221,7 +221,7 @@ models:
description: The device that was used to open the email.

- name: email_send_id
description: The inferred ID for the email sent.
description: The inferred ID for the email sent. This is created by concatenating primary_attribute_value_id, campaign_id, campaign_run_id, and lead_id.

- name: email_template_id
description: The ID of the email's template.
Expand Down Expand Up @@ -271,7 +271,7 @@ models:
description: The choice number of the current step that triggered the activity.

- name: email_send_id
description: The inferred ID for the email sent.
description: The inferred ID for the email sent. This is created by concatenating primary_attribute_value_id, campaign_id, campaign_run_id, and lead_id.

- name: email_template_id
description: The ID of the email's template.
Expand Down Expand Up @@ -312,7 +312,7 @@ models:
description: The IP address of the client that unsubscribed.

- name: email_send_id
description: The inferred ID for the email sent.
description: The inferred ID for the email sent. This is created by concatenating primary_attribute_value_id, campaign_id, campaign_run_id, and lead_id.

- name: email_template_id
description: The ID of the email's template.
Expand Down
2 changes: 1 addition & 1 deletion models/stg_marketo__activity_click_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ with base as (

select
*,
{{ dbt_utils.surrogate_key(['campaign_id','campaign_run_id','lead_id']) }} as email_send_id
{{ dbt_utils.surrogate_key(['primary_attribute_value_id','campaign_id','campaign_run_id','lead_id']) }} as email_send_id
from fields

)
Expand Down
2 changes: 1 addition & 1 deletion models/stg_marketo__activity_email_bounced.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with base as (

select
*,
{{ dbt_utils.surrogate_key(['campaign_id','campaign_run_id','lead_id']) }} as email_send_id
{{ dbt_utils.surrogate_key(['primary_attribute_value_id','campaign_id','campaign_run_id','lead_id']) }} as email_send_id
from fields

)
Expand Down
2 changes: 1 addition & 1 deletion models/stg_marketo__activity_email_delivered.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ with base as (

select
*,
{{ dbt_utils.surrogate_key(['campaign_id','campaign_run_id','lead_id']) }} as email_send_id
{{ dbt_utils.surrogate_key(['primary_attribute_value_id','campaign_id','campaign_run_id','lead_id']) }} as email_send_id
from fields

)
Expand Down
2 changes: 1 addition & 1 deletion models/stg_marketo__activity_open_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with base as (

select
*,
{{ dbt_utils.surrogate_key(['campaign_id','campaign_run_id','lead_id']) }} as email_send_id
{{ dbt_utils.surrogate_key(['primary_attribute_value_id','campaign_id','campaign_run_id','lead_id']) }} as email_send_id
from fields

)
Expand Down
2 changes: 1 addition & 1 deletion models/stg_marketo__activity_send_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ with base as (

select
*,
{{ dbt_utils.surrogate_key(['campaign_id','campaign_run_id','lead_id']) }} as email_send_id
{{ dbt_utils.surrogate_key(['primary_attribute_value_id','campaign_id','campaign_run_id','lead_id']) }} as email_send_id
from fields

)
Expand Down
2 changes: 1 addition & 1 deletion models/stg_marketo__activity_unsubscribe_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ with base as (

select
*,
{{ dbt_utils.surrogate_key(['campaign_id','campaign_run_id','lead_id']) }} as email_send_id
{{ dbt_utils.surrogate_key(['primary_attribute_value_id','campaign_id','campaign_run_id','lead_id']) }} as email_send_id
from fields

)
Expand Down

0 comments on commit 2b66fcf

Please sign in to comment.