Stuart Horgan
10/13/2022, 3:46 PMdef read_records(self, *args, **kwargs) -> Iterable[Mapping[str, Any]]:
for record in super().read_records(*args, **kwargs):
if self._cursor_value:
latest_record_date = record[self.cursor_field]
self._cursor_value = max(self._cursor_value, latest_record_date)
yield record
and this is how we get the new state value for future runs to use. But the first time you run it, the self._cursor_value is set to None, so we never enter the if statement and update to the latest value. So what is supposed to happen here? How do we get the correct state returned at the end of the first run instead of the start date being returned unchanged?user
10/13/2022, 3:52 PMuser
10/13/2022, 5:39 PMIncrementalMixin as per the docs? This is the latest and recommended way of implementing an incremental stream:
https://docs.airbyte.com/connector-development/cdk-python/incremental-stream/#incrementalmixinStuart Horgan
10/14/2022, 8:59 AMuser
10/14/2022, 3:33 PM