From 05f941da016d62072806c8dfd90b8d49d3c22fea Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Fri, 19 Aug 2022 10:23:27 -0400 Subject: [PATCH 1/7] versioning --- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index 0e91b29..39820ba 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'marketo_source' -version: '0.7.1' +version: '0.8.1' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index cff5ca9..a67b6d0 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'marketo_source_integration_tests' -version: '0.7.1' +version: '0.8.1' profile: 'integration_tests' config-version: 2 From 58816f995916ffd2b4d8ee93ba398d5418e623a7 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Fri, 19 Aug 2022 10:23:52 -0400 Subject: [PATCH 2/7] update surr key to include primary attribute value --- models/stg_marketo.yml | 2 +- models/stg_marketo__activity_send_email.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/stg_marketo.yml b/models/stg_marketo.yml index 75f601a..fa48ecb 100644 --- a/models/stg_marketo.yml +++ b/models/stg_marketo.yml @@ -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. diff --git a/models/stg_marketo__activity_send_email.sql b/models/stg_marketo__activity_send_email.sql index 9ce3c2e..d32365e 100644 --- a/models/stg_marketo__activity_send_email.sql +++ b/models/stg_marketo__activity_send_email.sql @@ -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 ) From 463ec98d2dd7ccc1a65bf86b1a2bde3177437ea0 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Fri, 19 Aug 2022 10:27:11 -0400 Subject: [PATCH 3/7] fix version-- not a breaking change --- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index 39820ba..8c11777 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'marketo_source' -version: '0.8.1' +version: '0.7.2' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index a67b6d0..49730a7 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'marketo_source_integration_tests' -version: '0.8.1' +version: '0.7.2' profile: 'integration_tests' config-version: 2 From fa47893391af0442efcb90f72d7798e66574335d Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Fri, 19 Aug 2022 10:41:56 -0400 Subject: [PATCH 4/7] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 851b671..d557b2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 part of the same campaign. (https://github.com/fivetran/dbt_marketo_source/issues/25) +[#26](https://github.com/fivetran/dbt_marketo_source/pull/26) +## Contributors +- [sfc-gh-sugupta](https://github.com/sfc-gh-sugupta) # dbt_marketo_source v0.7.1 ## Bug Fixes From d2e425a096a160be3db260b7603434e4397278e5 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Tue, 23 Aug 2022 17:27:47 -0400 Subject: [PATCH 5/7] update email send id for all --- models/stg_marketo.yml | 10 +++++----- models/stg_marketo__activity_click_email.sql | 2 +- models/stg_marketo__activity_email_bounced.sql | 2 +- models/stg_marketo__activity_email_delivered.sql | 2 +- models/stg_marketo__activity_open_email.sql | 2 +- models/stg_marketo__activity_unsubscribe_email.sql | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/models/stg_marketo.yml b/models/stg_marketo.yml index fa48ecb..22f9ede 100644 --- a/models/stg_marketo.yml +++ b/models/stg_marketo.yml @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. diff --git a/models/stg_marketo__activity_click_email.sql b/models/stg_marketo__activity_click_email.sql index 73ce839..2fb7b8f 100644 --- a/models/stg_marketo__activity_click_email.sql +++ b/models/stg_marketo__activity_click_email.sql @@ -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 ) diff --git a/models/stg_marketo__activity_email_bounced.sql b/models/stg_marketo__activity_email_bounced.sql index 2b5369c..4ef4b6d 100644 --- a/models/stg_marketo__activity_email_bounced.sql +++ b/models/stg_marketo__activity_email_bounced.sql @@ -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 ) diff --git a/models/stg_marketo__activity_email_delivered.sql b/models/stg_marketo__activity_email_delivered.sql index d18956f..2afa8c0 100644 --- a/models/stg_marketo__activity_email_delivered.sql +++ b/models/stg_marketo__activity_email_delivered.sql @@ -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 ) diff --git a/models/stg_marketo__activity_open_email.sql b/models/stg_marketo__activity_open_email.sql index d0bbe16..e8d2352 100644 --- a/models/stg_marketo__activity_open_email.sql +++ b/models/stg_marketo__activity_open_email.sql @@ -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 ) diff --git a/models/stg_marketo__activity_unsubscribe_email.sql b/models/stg_marketo__activity_unsubscribe_email.sql index 0af8368..e456c0a 100644 --- a/models/stg_marketo__activity_unsubscribe_email.sql +++ b/models/stg_marketo__activity_unsubscribe_email.sql @@ -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 ) From 533a77669639095e9b4f167736442e77068fbfdf Mon Sep 17 00:00:00 2001 From: Renee Li <91097070+fivetran-reneeli@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:28:11 -0400 Subject: [PATCH 6/7] Update CHANGELOG.md Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d557b2d..f46a1b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 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 part of the same campaign. (https://github.com/fivetran/dbt_marketo_source/issues/25) +- 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) From 19c019363c905834542adb71449beade144078fb Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Wed, 24 Aug 2022 12:49:16 -0400 Subject: [PATCH 7/7] commit issue --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f46a1b0..9371bb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ - 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) +- [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