From 4c224e13199a5a2c6f982ac6cc795073bc09af95 Mon Sep 17 00:00:00 2001 From: dat-a-man <98139823+dat-a-man@users.noreply.github.com> Date: Thu, 21 Mar 2024 06:52:34 +0000 Subject: [PATCH] Updated --- docs/website/docs/general-usage/incremental-loading.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/website/docs/general-usage/incremental-loading.md b/docs/website/docs/general-usage/incremental-loading.md index 28aadd4619..e3454bcef4 100644 --- a/docs/website/docs/general-usage/incremental-loading.md +++ b/docs/website/docs/general-usage/incremental-loading.md @@ -621,7 +621,7 @@ Let's take the following example to read incremental loading parameters from the 1. In "config.toml", define the parameter `id_after` as follows: ```toml # Configuration snippet for an incremental resource - [incs.sources.pipeline.inc_res.id_after] + [incremental_source.sources.pipeline.generate_incremental_records.id_after] cursor_path = "idAfter" initial_value = 10 ``` @@ -630,19 +630,18 @@ Let's take the following example to read incremental loading parameters from the 1. The `id_after` parameter is defined as an incremental source, and its value is retrieved from the configuration using `dlt.config.value`. ```py @dlt.resource(table_name="incremental_records") - def inc_res(id_after: dlt.sources.incremental = dlt.config.value): + def generate_incremental_records(id_after: dlt.sources.incremental = dlt.config.value): for i in range(100): yield {"id": i, "idAfter": i, "name": "name-" + str(i)} - pipeline = dlt.pipeline( pipeline_name="pipeline_with_incremental", destination="duckdb", ) - pipeline.run(inc_res) + pipeline.run(generate_incremental_records) ``` - The `inc_res` function generates a range of data, each item being a dictionary with keys `id`, `idAfter`, and `name`. The `idAfter` key is used by the incremental resource to track progress. + The `generate_incremental_records` function generates a range of data, each item being a dictionary with keys `id`, `idAfter`, and `name`. The `idAfter` key is used by the incremental resource to track progress. ## Doing a full refresh