Skip to content

Commit

Permalink
Merge pull request #17 from fivetran/bugfix/member_unique_test
Browse files Browse the repository at this point in the history
update unique test
  • Loading branch information
fivetran-reneeli authored Aug 9, 2023
2 parents 20e748a + 9e3b072 commit a203517
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# dbt_mailchimp_source v0.5.1

## 🎉 Feature Update
- Updates the unique test for `stg_mailchimp__members` to include both `member_id` and `list_id`, as these make up the unique key for the respective source table ([PR #17](https://github.com/fivetran/dbt_mailchimp_source/pull/17))

# dbt_mailchimp_source v0.5.0
## 🎉 Feature Update
- Databricks compatibility! ([#15](https://github.com/fivetran/dbt_mailchimp_source/pull/15))
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: 'mailchimp_source'
version: '0.5.0'
version: '0.5.1'
config-version: 2
models:
mailchimp_source:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

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: 'mailchimp_source_integration_tests'
version: '0.5.0'
version: '0.5.1'
config-version: 2
profile: 'integration_tests'
vars:
Expand Down
1 change: 1 addition & 0 deletions integration_tests/seeds/automation.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
id,_fivetran_deleted,_fivetran_synced,create_time,list_id,segment_id,segment_text,start_time,status,title,trigger_settings
71ad2ce945,false,2020-04-23 11:40:06.382,2020-04-16 20:34:40,8e423a4179,,,2020-04-17 12:56:37,sending,Welcome Email,"{""workflow_type"":""singleWelcome"",""workflow_title"":""Single Email Welcome"",""runtime"":{""days"":[""sunday"",""monday"",""tuesday"",""wednesday"",""thursday"",""friday"",""saturday""],""hours"":{""type"":""automation""}},""workflow_emails_count"":1}"
12345,false,2020-04-23 11:40:06.382,2020-04-16 20:34:40,8e423a4180,,,,,,
1 change: 1 addition & 0 deletions integration_tests/seeds/automation_email.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
id,_fivetran_deleted,_fivetran_synced,archive_url,authenticate,auto_footer,auto_tweet,automation_id,clicktale,content_type,create_time,delay_action,delay_action_description,delay_amount,delay_direction,delay_full_description,delay_type,drag_and_drop,fb_comments,folder_id,from_name,google_analytics,inline_css,position,reply_to,send_time,start_time,status,subject_line,template_id,timewarp,title,to_name,track_ecomm_360,track_goals,track_html_clicks,track_opens,track_text_clicks,use_conversation
b63e7b8aff,false,2020-04-23 11:40:06.528,http://eepurl.com/gZ9pBe,true,false,false,71ad2ce945,,template,2020-04-16 20:34:40,signup,"subscribed contacts join your audience ",0,,"Immediately after subscribed contacts join your audience ",now,true,true,,Bob,AUTOMATION_Welcome_Message_1,false,1,[email protected],2020-04-22 14:54:10,2020-04-17 12:56:37,sending,Welcome to the community! 👓,158,,Welcome Message,,false,false,true,true,false,
123,false,2020-04-23 11:40:06.528,http://eepurl.com/gZ9pBe,true,false,false,12345,,template,2020-04-16 20:34:40,signup,"subscribed contacts join your audience ",0,,"Immediately after subscribed contacts join your audience ",now,true,true,,Bob,AUTOMATION_Welcome_Message_1,false,1,[email protected],2020-04-22 14:54:10,2020-04-17 12:56:37,sending,Welcome to the community! 👓,158,,Welcome Message,,false,false,true,true,false,
1 change: 1 addition & 0 deletions integration_tests/seeds/automation_recipient.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
automation_email_id,member_id,_fivetran_synced,list_id
b63e7b8aff,4956ae6c75ac652fd9a32c7c5ed8083a,2020-04-21 14:59:12.754,8e423a4179
b63e7b8aff,4d1bf0aa67690a2b483771ce00cfb6a7,2020-04-21 14:59:12.706,8e423a4179
123,4956ae6c75ac652fd9a32c7c5ed8083a,2020-04-21 14:59:12.755,8e423a4180
1 change: 1 addition & 0 deletions integration_tests/seeds/automation_recipient_activity.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ click,b63e7b8aff,4956ae6c75ac652fd9a32c7c5ed8083a,2020-04-21 14:53:34,2020-04-21
click,b63e7b8aff,4d1bf0aa67690a2b483771ce00cfb6a7,2020-04-21 14:52:11,2020-04-21 14:59:12.754,,76.64.79.89,8e423a4179,https://github.com/example
click,b63e7b8aff,4956ae6c75ac652fd9a32c7c5ed8083a,2020-04-21 14:53:32,2020-04-21 14:59:12.754,,76.64.79.89,8e423a4179,https://github.com/example
click,b63e7b8aff,4956ae6c75ac652fd9a32c7c5ed8083a,2020-04-21 14:53:37,2020-04-21 14:59:12.755,,76.64.79.89,8e423a4179,https://join.slack.com/t/
click,123,4956ae6c75ac652fd9a32c7c5ed8083a,2020-04-21 14:53:37,2020-04-21 14:59:12.755,,76.64.79.89,8e423a4180,https://join.slack.com/t/
1 change: 1 addition & 0 deletions integration_tests/seeds/list.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
id,_fivetran_deleted,_fivetran_synced,beamer_address,contact_address_1,contact_address_2,contact_city,contact_company,contact_country,contact_state,contact_zip,date_created,default_from_email,default_from_name,default_language,default_subject,email_type_option,list_rating,name,notify_on_subscribe,notify_on_unsubscribe,permission_reminder,subscribe_url_long,subscribe_url_short,use_archive_bar,visibility
8e423a4179,false,2020-04-23 11:40:05.594,[email protected],87 Hogwarts Avenue,,London,Example Company,UK,London,M5S1K1,2019-10-01 21:39:58,[email protected],Bob,en,,false,0.0,Example Company,,,You are receiving this email because you opted in via our website.,https://dev.us20.list-manage.com/subscribe?u=ca09e4761ebff536235e260&id=8e423a4179,http://eepurl.com/gITsH5,true,pub
8e423a4180,false,2020-04-23 11:40:05.594,[email protected],87 Hogwarts Avenue,,London,Example Company,UK,London,M5S1K1,2019-10-01 21:39:58,[email protected],Bob,en,,false,0.0,Example Company,,,You are receiving this email because you opted in via our website.,https://dev.us20.list-manage.com/subscribe?u=ca09e4761ebff536235e260&id=8e423a4179,http://eepurl.com/gITsH5,true,pub
1 change: 1 addition & 0 deletions integration_tests/seeds/member.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ id,list_id,_fivetran_synced,country_code,dstoff,email_address,email_client,email
b2ac489697c655e85db6dfedc5c2fee5,8e423a4179,2020-04-14 21:27:39.423,US,0.0,[email protected],Gmail,html,0.0,104.244.24.68,104.244.24.68,en,2019-11-26 23:58:17,37.7482,-122.416,3,Mary,,subscribed,2019-11-06 21:35:22,2019-11-06 21:34:58,415/628,b6a9ddfb47,false
f5114e6e6bb39e07781d2f51f409a7fe,8e423a4179,2020-04-14 21:27:39.638,US,0.0,[email protected],Gmail,html,0.0,107.77.211.18,107.77.211.18,en,2019-11-27 00:00:37,37.6343,-122.063,4,Ralph,,subscribed,2019-11-07 18:39:11,2019-11-07 18:38:51,510,3118fb623a,false
37cc8cad6a75f018d69632984d8caf38,8e423a4179,2020-04-14 21:27:39.639,US,0.0,[email protected],Apple Mail,html,0.0,198.178.12.68,67.245.32.119,en,2019-11-08 13:10:10,40.7553,-73.992,4,Ben,,subscribed,2019-11-08 13:10:10,2019-11-08 11:27:04,212/332/646/917,6f9d527f62,false
4956ae6c75ac652fd9a32c7c5ed8083a,8e423a4180,2020-04-21 14:59:10.402,CA,0.0,[email protected],,html,0.0,76.64.79.89,76.64.79.89,en,2020-04-21 14:52:45,43.67,-79.38,2,,,subscribed,2020-04-21 14:52:45,2020-04-21 14:52:25,America/Toronto,24037f9b6b,false
6 changes: 5 additions & 1 deletion models/stg_mailchimp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,15 @@ models:

- name: stg_mailchimp__members
description: Each record represents a member in Mailchimp.
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- member_id
- list_id
columns:
- name: member_id
description: The ID of the member.
tests:
- unique
- not_null

- name: email_address
Expand Down

0 comments on commit a203517

Please sign in to comment.