Having trouble figuring out how to get the tap/pag...
# getting-started
m
Having trouble figuring out how to get the tap/paginator to start where it left off. I set the replication key as one of my records "current_date" and the method as incremental. I have been trying to instantiate the paginator with the replication key value but having no context variable in the get_new_paginator has made this unsuccessful. I also tried using write_starting_replication_value in post process to get the last current_date in there but the tap always starts from the default start_date that is in the meltano.yml. I don't really know which functions to mess with to accomplish this so any help would be greatly appreciated.
r
Hi again! Generally speaking, you want the paginator to work off the initial request of the sync - that it to say that you should set up the initial request with the replication key value from context, then let the paginator continue as normal.
m
Okay that makes sense so do this in the prepare_request function. The difficulty I have found trying that is there are several functions that seem to deal with setting/writing/accessing the replication key value or starting timestamp or signpost etc. Which should I be trying to use?
r
You probably want to be using get_starting_timestamp - like this. Given that you have defined a
replication_key
for your stream,
get_starting_timestamp
will get the value from either config or state (whichever is most recent).
m
Thats much simpler than I was expecting. I added those lines to my client.py and it seems to be working well. Thank you once again Reuben, you continue to amaze me.