-
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: Add optional start_date to config #32852
Merged
Merged
Changes from 29 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
47a6a5a
add start date to config
ChristoGrab b611729
Source Hubspot: fix expected records (#32645)
roman-yermilov-gl a9cc2b9
Source Github: fix expected records (#32644)
roman-yermilov-gl e74bbde
✨ Source Mailchimp: Add Interests, InterestCategories, Tags streams (…
ChristoGrab 918e64c
🐛 Source Pinterest: Fix backoff waiting time (#32672)
tolik0 0f28144
🚨🚨🐛 Source Pinterest: Update date-time fields with airbyte_type: time…
tolik0 39ac79c
remove bq+snowflake from legacy normalization docs (#32708)
edgao 667be92
🐛 Source Pinterest: Fix Advertiser stream names (#32734)
tolik0 059ca2f
✨ Source Pinterest: Update docs and spec; add missing `placement_traf…
tolik0 d81ae88
🐛 Source Facebook Marketing: Removed validation that blocked personal…
tolik0 74d359d
Docs: Add permissions to prereqs in Source Facebook Marketing (#32653)
ChristoGrab 3e69945
✨ Source Mailchimp: Implement SegmentMembers stream (#32782)
ChristoGrab 4cdfc7a
Source My Hours: Update CDK (#32680)
ChristoGrab 428e1b3
add logic for use of start_date in incremental streams
ChristoGrab b5d0ede
Source Cart: Update CDK to Latest Version (#32705)
pnilan 86848a6
Source Twilio: Increase test coverage, fix parse_response bug, update…
pnilan 1fda1df
Source Sendgrid: Increase Test Coverage, Update Expected Records (#32…
pnilan 941d937
fix method and add unit test
ChristoGrab d17e251
version bump
ChristoGrab b2a546e
small edits
ChristoGrab 1a0bb33
Automated Commit - Formatting Changes
ChristoGrab a660279
✨Source Amazon Seller Partner: multiple updates (#32833)
00a896b
add note to docs
ChristoGrab 05c5acb
Merge branch 'christo/mailchimp-start-date' of https://github.com/air…
ChristoGrab 88b24cf
Merge remote-tracking branch 'origin/master' into dev
git-phu 604a2ab
Merge branch 'dev' of https://github.com/airbytehq/airbyte into chris…
ChristoGrab c28ca4d
Merge from master
ChristoGrab 04a9d68
chore: fix duplicated docs section
ChristoGrab a0c3516
Merge branch 'master' into christo/mailchimp-start-date
ChristoGrab a1abc41
Merge branch 'master' of https://github.com/airbytehq/airbyte into ch…
ChristoGrab 4b524b3
Merge branch 'master' of https://github.com/airbytehq/airbyte into ch…
ChristoGrab 66da4fe
fix: refactor implementation of start_date
ChristoGrab 47366b2
refactor unit tests
ChristoGrab f52d5af
updated expected_records
ChristoGrab a400070
Automated Commit - Formatting Changes
ChristoGrab 0195913
chore: fix merge conflict
ChristoGrab 4814279
Merge branch 'master' into christo/mailchimp-start-date
ChristoGrab 918388d
Merge branch 'master' into christo/mailchimp-start-date
ChristoGrab b7d30b7
merge changes from update to 1.0.0
ChristoGrab 2b4b74f
Merge branch 'christo/mailchimp-start-date' of https://github.com/air…
ChristoGrab f6953e3
add separate method for client-side filter
ChristoGrab aa2b6de
chore: format fix
ChristoGrab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why we need filter records on our side if we already use slicing with
default_params
and sending request with specified range in query params?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.
The query params used for server-side sorting and filtering are not supported by all Mailchimp endpoints, so certain streams (such as SegmentMembers and Unsubscribes) require us to add any filtering logic on our end regardless. My thinking was that by applying our own filter here we ensure the consistent usage of
start_date
across all streams.Another option would be to incorporate the
start_date
in the server-side params by default and add a helper method with our own filtering logic that is only invoked by streams where it is necessary. This would be more resource efficient, but my one concern with this solution is that it could lead to more costly maintenance and debugging down the line if/when new streams are implemented that do not support the filtering params. Let me know if you still think this is a more sensible approach, or if there's another solution you would recommend!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.
I observed two aspects that need to be addressed separately. Firstly, we should establish the optional nature of the
start_date
field, and then we can strategize on introducing an incremental approach, which is currently unsupported.As for the first aspect, I suggest defining a default value for cases where the
start_date
is not provided. If we could retrieves all data without applying any filtering query params let's do this, but if to get any data we must specify it let it be some default value. Based on my experience, a reasonable default could be to fetch data from two years ago starting from the date of the first synchronization.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.
@lazebnyi I've refactored the implementation of the start_date filtering to align with the existing use of slicing in request params as you noted. The start_date is now compared against the current slice's cursor value to determine which will be used as the filter in request params.
For the Segment Members and Unsubscribes streams the filtering still takes place during the response parsing instead, since their endpoints do not support the filtering param. One thing I did choose to leave out is a default start_date value, as the API does allow us retrieve all data by not including a filter param in the request. Provided no cursor value exists yet for the current slice and no start_date is set in the config, the param is left empty and all data is fetched.