-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 - fix the way request params are built #20765
Source Mailchimp - fix the way request params are built #20765
Conversation
/test connector=connectors/source-mailchimp |
…te-issue-second-try
/test connector=connectors/source-mailchimp |
/test connector=connectors/source-mailchimp
Build PassedTest summary info:
|
/publish connector=connectors/source-mailchimp
if you have connectors that successfully published but failed definition generation, follow step 4 here |
* 1058 source mailchimp - fix the way request params are built * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
campaigns = Campaigns(authenticator=self.authenticator).read_records(sync_mode=SyncMode.full_refresh) | ||
for campaign in campaigns: | ||
slice_ = {"campaign_id": campaign["id"]} | ||
cursor_value = stream_state.get(campaign["id"], {}).get(self.cursor_field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like cursor_field
is set to timestamp. I know you have a sort_field of create_time but Mailchimp does not allow you to change the sorting. That means that you're going to lose a lot of records. The timestamp should stay the same the offset is what should be used to paginate. You will set the offset too offset = offset + pagesize; The since param should not change.
https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination
As you can see from the list-email-activity docs, there is no sort_field. I believe you're sort variable is just getting ignored.
https://mailchimp.com/developer/marketing/api/email-activity-reports/list-email-activity/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@murphpdx as for now there's just a single slice per campaign, this means we request all the data after the since
date from the API and dont actually care if there is sorting or not. Can you confirm the bug still persists with you after upgrading to the latest version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not paginating? It seems like you are here: https://github.com/airbytehq/airbyte/pull/20765/files#diff-56a4fde71ca00cdb2a92c3716de8b181115d431e07023b7881ee628aa382816cR46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided not to use airbyte last summer due in part to this bug. So I don't have the time to test it out for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we are paginating and the since param remains the same throughout all the pages within one campaign. The thing is you are pointing to the stream_slices
method which yields one slice per campaign and the pagination is made within one slice.
What
https://github.com/airbytehq/oncall/issues/1058
How