dan_ladd
08/19/2021, 7:07 PMdef get_url_params(self, context: Optional[dict], next_page_token: Optional[Any]) -> Dict[str, Any]:
"""Return a dictionary of values to be used in URL parameterization."""
params: dict = {}
params["per_page"] = self.config.get("per_page")
params["sort_by"] = "date_modified"
params["sort_order"] = "ASC"
params["start_modified_at"] = self.get_starting_timestamp(context)
params["page"]=next_page_token
return params
Now that stream is clearly sorted, but if I set is_sorted = True
, self.get_starting_timestamp(context)
updates after every call and messes up the pagination.
The easy solution is to not set is_sorted = True
, but I like that it will continue if interrupted. Any suggestions or am I missing something?aaronsteers
08/19/2021, 7:21 PMget_starting_timestamp()
should not change during the course of the sync - Do you mind opening an issue to describe what you are seeing?
As a workaround, you could cache the result yourself in a custom property at the beginning of the stream sync. That's not ideal though, and I believe the expected behavior should be that it returns a single value through the lifecycle of the sync.aaronsteers
08/19/2021, 7:22 PMdan_ladd
08/19/2021, 7:23 PMaaronsteers
08/19/2021, 7:24 PMdan_ladd
08/19/2021, 7:27 PMaaronsteers
08/31/2021, 10:01 PMdan_ladd
09/01/2021, 12:30 PMdan_ladd
09/01/2021, 1:32 PMAs a workaround, you could cache the result yourself in a custom property at the beginning of the stream sync. That's not ideal though, and I believe the expected behavior should be that it returns a single value through the lifecycle of the sync.This works for now, thanks!