Skip to content

Commit

Permalink
Low-Code CDK: make DatetimeStreamSlicer.step InterpolatedString (#21930)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr committed Jan 31, 2023
1 parent 8276d03 commit 11df98c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DatetimeStreamSlicer(StreamSlicer, JsonSchemaMixin):

start_datetime: Union[MinMaxDatetime, str]
end_datetime: Union[MinMaxDatetime, str]
step: str
step: Union[InterpolatedString, str]
cursor_field: Union[InterpolatedString, str]
datetime_format: str
cursor_granularity: str
Expand All @@ -72,7 +72,7 @@ def __post_init__(self, options: Mapping[str, Any]):
self._timezone = datetime.timezone.utc
self._interpolation = JinjaInterpolation()

self._step = self._parse_timedelta(self.step)
self._step = self._parse_timedelta(InterpolatedString.create(self.step, options=options).eval(self.config))
self._cursor_granularity = self._parse_timedelta(self.cursor_granularity)
self.cursor_field = InterpolatedString.create(self.cursor_field, options=options)
self.lookback_window = InterpolatedString.create(self.lookback_window, options=options)
Expand Down

0 comments on commit 11df98c

Please sign in to comment.