You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building an incremental sync connection with the UI builder, I needed to use a P6M lookback period
However, when using a month ("M") lookback period, the builder fails to test with the following stacktrace:
Error: year 0 is out of range
Traceback (most recent call last):
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 133, inread
yield from self._read_stream(
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 239, in _read_stream
forrecord_data_or_messagein record_iterator:
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/streams/core.py", line 176, inread
checkpoint_reader = self._get_checkpoint_reader(
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/declarative_stream.py", line 194, in _get_checkpoint_reader
mappings_or_slices = self.stream_slices(
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/declarative_stream.py", line 159, in stream_slices
returnself.retriever.stream_slices()
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 482, in stream_slices
returnislice(super().stream_slices(), self.maximum_number_of_slices)
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 429, in stream_slices
returnself.stream_slicer.stream_slices()
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py", line 170, in stream_slices
start_datetime = self._calculate_earliest_possible_value(self.select_best_end_datetime())
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py", line 182, in _calculate_earliest_possible_value
cursor_datetime = self._calculate_cursor_datetime_from_state(self.get_stream_state()) - lookback_delta
File "/home/airbyte/.pyenv/versions/3.10.14/lib/python3.10/site-packages/isodate/duration.py", line 269, in __rsub__
newdt = other.replace(
ValueError: year 0 is out of range
The issue is fixed if I use a day-based lookback window like "P180D" ✅
Topic
lookback period with with a month (P1M) fails
Relevant information
Airbyte info:
Issue
When building an incremental sync connection with the UI builder, I needed to use a P6M lookback period
However, when using a month ("M") lookback period, the builder fails to test with the following stacktrace:
Error: year 0 is out of range
The issue is fixed if I use a day-based lookback window like "P180D" ✅
Additional details:
Incremental sync configuration:
_synced_when field is added through transformations:
config['data_inicio'] is a "date" user input, tested with the value '2023-01-01'
The text was updated successfully, but these errors were encountered: