Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨🚨🐛 Source Mailchimp: Multiple schema updates and fixes #32836

Merged
merged 49 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b611729
Source Hubspot: fix expected records (#32645)
roman-yermilov-gl Nov 20, 2023
a9cc2b9
Source Github: fix expected records (#32644)
roman-yermilov-gl Nov 20, 2023
e74bbde
✨ Source Mailchimp: Add Interests, InterestCategories, Tags streams (…
ChristoGrab Nov 20, 2023
918e64c
🐛 Source Pinterest: Fix backoff waiting time (#32672)
tolik0 Nov 21, 2023
0f28144
🚨🚨🐛 Source Pinterest: Update date-time fields with airbyte_type: time…
tolik0 Nov 21, 2023
39ac79c
remove bq+snowflake from legacy normalization docs (#32708)
edgao Nov 21, 2023
667be92
🐛 Source Pinterest: Fix Advertiser stream names (#32734)
tolik0 Nov 23, 2023
059ca2f
✨ Source Pinterest: Update docs and spec; add missing `placement_traf…
tolik0 Nov 23, 2023
d81ae88
🐛 Source Facebook Marketing: Removed validation that blocked personal…
tolik0 Nov 23, 2023
74d359d
Docs: Add permissions to prereqs in Source Facebook Marketing (#32653)
ChristoGrab Nov 24, 2023
3e69945
✨ Source Mailchimp: Implement SegmentMembers stream (#32782)
ChristoGrab Nov 27, 2023
4cdfc7a
Source My Hours: Update CDK (#32680)
ChristoGrab Nov 27, 2023
742a78e
schema fixes
ChristoGrab Nov 27, 2023
eb69ac7
Merge branch 'dev' of https://github.com/airbytehq/airbyte into chris…
ChristoGrab Nov 27, 2023
00c4dee
move _links logic to base class, add datetime formats
ChristoGrab Nov 27, 2023
c62bb38
small edits
ChristoGrab Nov 27, 2023
7eb5a36
add suggested streams
ChristoGrab Nov 27, 2023
dfa94d4
Automated Commit - Formatting Changes
ChristoGrab Nov 27, 2023
221a992
update docs
ChristoGrab Nov 28, 2023
c9d5b22
Merge branch 'christo/mailchimp-fixes' of https://github.com/airbyteh…
ChristoGrab Nov 28, 2023
1a0a1ef
update docs
ChristoGrab Nov 28, 2023
5b84d90
make credentials required in spec
ChristoGrab Nov 28, 2023
2448573
Merge from master
ChristoGrab Nov 28, 2023
ff2b95b
remove duplicated test cases
ChristoGrab Nov 28, 2023
4b0cf77
Merge branch 'master' of https://github.com/airbytehq/airbyte into ch…
ChristoGrab Nov 30, 2023
7599ef1
remove credentials from required list in spec
ChristoGrab Nov 30, 2023
bb8e159
update expected_record
ChristoGrab Nov 30, 2023
54f6f69
add airbyte-type and update expected records
ChristoGrab Dec 1, 2023
990e5ad
add breaking change metadata
ChristoGrab Dec 3, 2023
b1dd717
feat: nullify all empty string fields in incremental streams
ChristoGrab Dec 3, 2023
7cc4707
Merge branch 'master' of https://github.com/airbytehq/airbyte into br…
ChristoGrab Dec 3, 2023
e844e1a
update string fields to be nullable in schema
ChristoGrab Dec 3, 2023
08766c1
update expected records
ChristoGrab Dec 3, 2023
fb53b7e
Automated Commit - Formatting Changes
ChristoGrab Dec 3, 2023
a0300da
docs fixes and small schema fix
ChristoGrab Dec 4, 2023
bcd9ea5
merge from master
ChristoGrab Dec 4, 2023
ed0e78c
Automated Commit - Formatting Changes
ChristoGrab Dec 4, 2023
4f8eb97
update automations and segments schemas
ChristoGrab Dec 6, 2023
a575e4e
Merge branch 'master' of https://github.com/airbytehq/airbyte into ch…
ChristoGrab Dec 6, 2023
ff0e1d7
chore: remove deprecated segment_members state and test catalog
ChristoGrab Dec 6, 2023
2d36bf9
Merge branch 'master' into christo/mailchimp-fixes
ChristoGrab Dec 6, 2023
6dcfc2e
Merge branch 'christo/mailchimp-fixes' of https://github.com/airbyteh…
ChristoGrab Dec 6, 2023
183018f
chore: update upgradeDeadline in metadata
ChristoGrab Dec 6, 2023
9a73353
Merge branch 'master' into christo/mailchimp-fixes
ChristoGrab Dec 7, 2023
536adb6
Merge branch 'master' into christo/mailchimp-fixes
ChristoGrab Dec 8, 2023
b6a429d
Automated Commit - Formatting Changes
ChristoGrab Dec 8, 2023
d878315
Merge branch 'master' into christo/mailchimp-fixes
ChristoGrab Dec 8, 2023
58c749b
add data reset steps to migration guide
ChristoGrab Dec 19, 2023
1f3dfef
Merge branch 'master' into christo/mailchimp-fixes
ChristoGrab Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: b03a9f3e-22a5-11eb-adc1-0242ac120002
dockerImageTag: 0.10.0
dockerImageTag: 0.10.1
dockerRepository: airbyte/source-mailchimp
documentationUrl: https://docs.airbyte.com/integrations/sources/mailchimp
githubIssueLabel: source-mailchimp
Expand All @@ -23,6 +23,12 @@ data:
oss:
enabled: true
releaseStage: generally_available
suggestedStreams:
streams:
- email_activity
- campaigns
- lists
- reports
supportLevel: certified
tags:
- language:python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"type": ["null", "string"]
},
"create_time": {
"type": ["null", "string"]
"type": ["null", "string"],
"format": "date-time"
},
"start_time": {
"type": ["null", "string"]
"type": ["null", "string"],
"format": "date-time"
},
"status": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"type": "string",
"title": "Create Time",
"description": "The date and time the campaign was created in ISO 8601 format.",
"readOnly": true
"readOnly": true,
"format": "date-time"
},
"archive_url": {
"type": "string",
Expand All @@ -52,10 +53,11 @@
"readOnly": true
},
"send_time": {
"type": "string",
"type": ["null", "string"],
"title": "Send Time",
"description": "The date and time a campaign was sent.",
"readOnly": true
"readOnly": true,
"format": "date-time"
},
"content_type": {
"type": "string",
Expand Down Expand Up @@ -258,7 +260,8 @@
"title": "Send Times",
"description": "The possible send times to test. The times provided should be in the format YYYY-MM-DD HH:MM:SS. If send_times are provided to test, the test_size will be set to 100% and winner_criteria will be ignored.",
"items": {
"type": "string"
"type": ["null", "string"],
"format": "date-time"
}
},
"from_names": {
Expand Down Expand Up @@ -503,7 +506,8 @@
"type": "string",
"title": "Last Sent",
"description": "The date the campaign was last sent.",
"readOnly": true
"readOnly": true,
"format": "date-time"
},
"constrain_rss_img": {
"type": "boolean",
Expand Down Expand Up @@ -579,12 +583,14 @@
"description": "For campaigns split on 'Subject Line', the subject line for Group B."
},
"send_time_a": {
"type": "string",
"type": ["null", "string"],
"format": "date-time",
"title": "Send Time Group A",
"description": "The send time for Group A."
},
"send_time_b": {
"type": "string",
"type": ["null", "string"],
"format": "date-time",
"title": "Send Time Group B",
"description": "The send time for Group B."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@
"type": ["null", "string"]
},
"timestamp_opt": {
"type": ["null", "string"]
"type": ["null", "string"],
"format": "date-time"
},
"member_rating": {
"type": ["null", "integer"]
},
"last_changed": {
"type": ["null", "string"]
"type": ["null", "string"],
"format": "date-time"
},
"language": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@
"type": "string",
"title": "Campaign Last Sent",
"description": "The date and time the last campaign was sent to this list in ISO 8601 format. This is updated when a campaign is sent to 10 or more recipients.",
"readOnly": true
"readOnly": true,
"format": "date-time"
},
"merge_field_count": {
"type": "integer",
Expand Down Expand Up @@ -287,13 +288,15 @@
"type": "string",
"title": "Date of Last List Subscribe",
"description": "The date and time of the last time someone subscribed to this list in ISO 8601 format.",
"readOnly": true
"readOnly": true,
"format": "date-time"
},
"last_unsub_date": {
"type": "string",
"title": "Date of Last List Unsubscribe",
"description": "The date and time of the last time someone unsubscribed from this list in ISO 8601 format.",
"readOnly": true
"readOnly": true,
"format": "date-time"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@
"last_open": {
"type": "string",
"title": "Last Open",
"description": "The last open for Campaign A."
"description": "The last open for Campaign A.",
"format": "date-time"
},
"unique_opens": {
"type": "integer",
Expand Down Expand Up @@ -373,7 +374,8 @@
"last_open": {
"type": "string",
"title": "Last Open",
"description": "The last open for Campaign B."
"description": "The last open for Campaign B.",
"format": "date-time"
},
"unique_opens": {
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"type": ["null", "string"]
},
"timestamp_opt": {
"type": ["null", "string"]
"type": ["null", "string"],
"format": "date-time"
},
"member_rating": {
"type": ["null", "integer"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"type": ["null", "boolean"]
},
"timestamp": {
"type": ["null", "string"]
"type": ["null", "string"],
"format": "date-time"
},
"reason": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def request_params(
next_page_token: Mapping[str, Any] = None,
) -> MutableMapping[str, Any]:

params = {"count": self.page_size}
# The ._links field is returned by most Mailchimp endpoints and contains non-relevant schema metadata.
params = {"count": self.page_size, "exclude_fields": f"{self.data_field}._links"}

# Handle pagination by inserting the next page's token in the request parameters
if next_page_token:
Expand Down Expand Up @@ -143,9 +144,6 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
def request_params(self, stream_state=None, stream_slice=None, **kwargs) -> MutableMapping[str, Any]:
params = super().request_params(stream_state=stream_state, stream_slice=stream_slice, **kwargs)

# Exclude the _links field, as it is not user-relevant data
params["exclude_fields"] = f"{self.data_field}._links"

# Get the current state value for this list_id, if it exists
# Then, use the value in state to filter the request
current_slice = stream_slice.get("list_id")
Expand Down Expand Up @@ -185,6 +183,14 @@ class Campaigns(IncrementalMailChimpStream):
def path(self, **kwargs) -> str:
return "campaigns"

def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
response = super().parse_response(response, **kwargs)
for record in response:
# Set the send_time to None if it is an empty string to avoid validation errors
if record.get("send_time") == "":
record["send_time"] = None
yield record


class Automations(IncrementalMailChimpStream):
"""Doc Link: https://mailchimp.com/developer/marketing/api/automation/get-automation-info/"""
Expand Down Expand Up @@ -275,13 +281,6 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
list_id = stream_slice.get("parent").get("id")
return f"lists/{list_id}/interest-categories"

def request_params(self, **kwargs):

# Exclude the _links field, as it is not user-relevant data
params = super().request_params(**kwargs)
params["exclude_fields"] = "categories._links"
return params


class Interests(MailChimpStream, HttpSubStream):
"""
Expand All @@ -299,13 +298,6 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
category_id = stream_slice.get("parent").get("id")
return f"lists/{list_id}/interest-categories/{category_id}/interests"

def request_params(self, **kwargs):

# Exclude the _links field, as it is not user-relevant data
params = super().request_params(**kwargs)
params["exclude_fields"] = "interests._links"
return params


class ListMembers(MailChimpListSubStream):
"""
Expand Down Expand Up @@ -485,12 +477,6 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
campaign_id = stream_slice.get("campaign_id")
return f"reports/{campaign_id}/unsubscribed"

def request_params(self, stream_state=None, stream_slice=None, **kwargs) -> MutableMapping[str, Any]:
params = super().request_params(stream_state=stream_state, stream_slice=stream_slice, **kwargs)
# Exclude the _links field, as it is not user-relevant data
params["exclude_fields"] = "unsubscribes._links"
return params

def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]:

response = super().parse_response(response, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def test_next_page_token(auth):
(
Lists,
{"stream_slice": None, "stream_state": None, "next_page_token": None},
{"count": 1000, "sort_dir": "ASC", "sort_field": "date_created"},
{"count": 1000, "sort_dir": "ASC", "sort_field": "date_created", "exclude_fields": "lists._links"},
),
(
Lists,
{"stream_slice": None, "stream_state": None, "next_page_token": {"offset": 1000}},
{"count": 1000, "sort_dir": "ASC", "sort_field": "date_created", "offset": 1000},
{"count": 1000, "sort_dir": "ASC", "sort_field": "date_created", "offset": 1000, "exclude_fields": "lists._links"},
),
(
InterestCategories,
Expand Down
Loading
Loading