-
Notifications
You must be signed in to change notification settings - Fork 95
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
Utilize bookmark of existing connection #196
Utilize bookmark of existing connection #196
Conversation
tap_hubspot/__init__.py
Outdated
""" | ||
If the current bookmark_key is available in the state, then return the bookmark_key value. | ||
If it is not available then check and return the older_bookmark_key in the state for the existing connection. | ||
If non of the key available in the state for a particular stream, then return start_date. |
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.
If non of the key available in the state for a particular stream, then return start_date. | |
If none of the keys are available in the state for a particular stream, then return start_date. |
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.
Updated.
tap_hubspot/__init__.py
Outdated
@@ -617,7 +627,14 @@ def sync_deals(STATE, ctx): | |||
# That's why bookmark_key is `property_hs_lastmodifieddate` so that we can mark it as automatic inclusion. | |||
|
|||
bookmark_field_in_record = 'hs_lastmodifieddate' |
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.
Change the variable name to "last_modified_date" for readability
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.
Updated variable name to last_modified_date
…into remove-older-replication-key-from-state
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.
Will the old bookmark key be removed from state after syncing and saving the new bookmark key to state?
No, the existing bookmark key will not be removed from the state after sync. Instead, the tap will save the old bookmark key and the new bookmark key in the state. |
I don't know if we should be saving an old key and value in state that will never be used. Can this just be replaced instead? Might be good to get some internal dev input here. |
@kspeer825 I think we should keep the old bookmark key in the state for backward compatibility. We have discussed the same thing with @cosimon and concluded to keep the old bookmark key in the state in case we need to revert back for any client. |
b7985ed
into
TDL-19319-make-replication-key-as-automatic-inclusion
* TDL 19241 add version timestamp in contacts (#191) * Added versionTimestamp in contacts stream. * Updated bookmark test case. * Updated comments. * Updated replication method of contacts stream. * TDL 16686 Implement request timeout (#177) * Initial commit for request_timeout * Updated unit test case error * Removed path of unittest file * Updated config file * Updated readme file * Initial commit. * Updated interruptes sync offset test case * Resolved comments. * Replaced replication key of deals stream with property_hs_lastmodifieddate field. * Updated discover test case. * Updated ingterrupted_sync test case. * Utilize bookmark of existing connection (#196) * Clearing bookmark for existing connection. * Updated bookmark logic to utilize older bookmark key. * Updated logic to keep older bookmark key in the state. * Added unittest cases. * Updated unit test cases. * Resolved review comments. * Updated get_start to use old bookmark for companies stream method. * Tdl 15447 fix pylint issues (#204) * fixed pylint issues TDL-15447 * changing methods to functions since there is no-self-use * pylint issues * more pylint issues * added pylint disable comment for some scenarios * remove duplicate-code from config.yaml * pylint comment for test_bookmarks * remove duplicate code * removed wrong-import-order Co-authored-by: kethan1122 <[email protected]>
* Qa/save test artifacts (singer-io#201) * add logging and save test logs as artifacts * name should be static method so it plays well with BaseCase Co-authored-by: kspeer <[email protected]> * skip fields missing from schema for contact_lists (singer-io#202) Co-authored-by: kspeer <[email protected]> * add limitExempt to all fields test workaround (singer-io#203) Co-authored-by: kspeer <[email protected]> * TDL-19319 Make replication key as automatic inclusion (singer-io#195) * TDL 19241 add version timestamp in contacts (singer-io#191) * Added versionTimestamp in contacts stream. * Updated bookmark test case. * Updated comments. * Updated replication method of contacts stream. * TDL 16686 Implement request timeout (singer-io#177) * Initial commit for request_timeout * Updated unit test case error * Removed path of unittest file * Updated config file * Updated readme file * Initial commit. * Updated interruptes sync offset test case * Resolved comments. * Replaced replication key of deals stream with property_hs_lastmodifieddate field. * Updated discover test case. * Updated ingterrupted_sync test case. * Utilize bookmark of existing connection (singer-io#196) * Clearing bookmark for existing connection. * Updated bookmark logic to utilize older bookmark key. * Updated logic to keep older bookmark key in the state. * Added unittest cases. * Updated unit test cases. * Resolved review comments. * Updated get_start to use old bookmark for companies stream method. * Tdl 15447 fix pylint issues (singer-io#204) * fixed pylint issues TDL-15447 * changing methods to functions since there is no-self-use * pylint issues * more pylint issues * added pylint disable comment for some scenarios * remove duplicate-code from config.yaml * pylint comment for test_bookmarks * remove duplicate code * removed wrong-import-order Co-authored-by: kethan1122 <[email protected]> --------- Co-authored-by: Kyle Speer <[email protected]> Co-authored-by: kspeer <[email protected]> Co-authored-by: Prijen Khokhani <[email protected]> Co-authored-by: kethan1122 <[email protected]>
Description of change
To use bookmark of existing connection we have updated code as below,
Note: We will not clear out existing bookmarks from the state. Instead, we will keep both bookmark values older and newer.
Manual QA steps
Risks
Rollback steps