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

updated prospects stream sync function #42

Merged
merged 7 commits into from
Feb 19, 2024

Conversation

somethingmorerelevant
Copy link
Member

@somethingmorerelevant somethingmorerelevant commented Jan 31, 2024

Description of change

  • Fixes Data discrepancy for prospects stream (adds support for limit offset pagination)

ref: https://developer.salesforce.com/docs/marketing/pardot/guide/prospects-v4.html#parameters-to-specify-which-results-are-returned

The default implementation would refer to the last record on the current page to get the next updated_at for the next request, this resulted in few records being missed in the iteration.

Manual QA steps

Risks

Rollback steps

  • revert this branch

@sgandhi1311
Copy link
Member

Please enhance the PR description by including details about the specific data discrepancies or scenarios that prompted the fix. This will provide better clarity on the problem being addressed and the solution proposed by the PR.

command: |
python3 -mvenv /usr/local/share/virtualenvs/tap-pardot
source /usr/local/share/virtualenvs/tap-pardot/bin/activate
pip install -U 'pip==22.2.2' 'setuptools==65.3.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider using the pip version 23.3.2?

Comment on lines +391 to +395
def sync(self):
self.pre_sync()
for rec in self.sync_page():
yield rec
self.post_sync()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the pre_sync and post_sync functions are not overridden in the parent class, they seem unnecessary here. Would it be beneficial to remove them from the class definition?
Correct me here if I am wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre_sync and post_sync are not implemented/modified in this class, but do exist in the parent class, and can be modified to add/remove functionality.
i am not removing it to keep this pattern constant across all streams of the tap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgandhi1311 please re-review

@somethingmorerelevant somethingmorerelevant merged commit 29ff131 into master Feb 19, 2024
3 checks passed
somethingmorerelevant added a commit that referenced this pull request Feb 20, 2024
somethingmorerelevant added a commit that referenced this pull request Feb 20, 2024
* revert prospects fix #42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants