diff --git a/docs/connector-development/config-based/tutorial/5-incremental-reads.md b/docs/connector-development/config-based/tutorial/5-incremental-reads.md index 87f08c4c43fb..a8068c63eaf4 100644 --- a/docs/connector-development/config-based/tutorial/5-incremental-reads.md +++ b/docs/connector-development/config-based/tutorial/5-incremental-reads.md @@ -115,13 +115,15 @@ The start time is defined in the config file, while the end time is defined by t Note that we're also setting the `stream_cursor_field` in the stream's `$options` so it can be accessed by the `StreamSlicer`: ```yaml -streams: - - type: DeclarativeStream +definitions: + <...> + rates_stream: + $ref: "*ref(definitions.base_stream)" $options: name: "rates" + primary_key: "date" + path: "/exchangerates_data/{{config['start_date'] or 'latest'}}" stream_cursor_field: "date" - primary_key: "rates" - <...> ``` We'll also update the retriever to user the stream slicer: @@ -138,20 +140,6 @@ definitions: This will generate slices from the start time until the end time, where each slice is exactly one day. The start time is defined in the config file, while the end time is defined by the `now_utc()` macro, which will evaluate to the current date in the current timezone at runtime. See the section on [string interpolation](../advanced-topics.md#string-interpolation) for more details. -Note that we're also setting the `stream_cursor_field` in the stream's `$options` so it can be accessed by the `StreamSlicer`: - -```yaml -definitions: - <...> - rates_stream: - $ref: "*ref(definitions.base_stream)" - $options: - name: "rates" - primary_key: "date" - path: "/exchangerates_data/{{config['start_date'] or 'latest'}}" - stream_cursor_field: "date" -``` - Finally, we'll update the path to point to the `stream_slice`'s start_time ```yaml @@ -299,4 +287,4 @@ Next, we'll run the [Source Acceptance Tests suite to ensure the connector invar - [Incremental reads](../../cdk-python/incremental-stream.md) - [Stream slicers](../understanding-the-yaml-file/stream-slicers.md) -- [Stream slices](../../cdk-python/stream-slices.md) \ No newline at end of file +- [Stream slices](../../cdk-python/stream-slices.md)