Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Document incremental definition via config.toml #1118

Merged
merged 7 commits into from
Mar 25, 2024

Conversation

dat-a-man
Copy link
Collaborator

Reading incremental parameters from configuration files.

Description

Related Issues

  • Fixes #...
  • Closes #...
  • Resolves #...

Additional Context

@dat-a-man dat-a-man requested review from sultaniman and zem360 March 20, 2024 12:09
Copy link

netlify bot commented Mar 20, 2024

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit 965d234
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/6601a821a661e50008af162c
😎 Deploy Preview https://deploy-preview-1118--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.



pipeline = dlt.pipeline(
pipeline_name="incs",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should name pipeline properly here something like pipeline_with_incremental

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

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="incs")
def inc_res(id_after: dlt.sources.incremental = dlt.config.value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here we maybe need to change the table_name parameter and then name of the function to something meaningful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also function name please :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


pipeline.run(inc_res)
```
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in the text as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

@burnash burnash added the documentation Improvements or additions to documentation label Mar 21, 2024
@sultaniman
Copy link
Contributor

@burnash @AstrakhantsevaAA how can we improve wording?

@dat-a-man
Copy link
Collaborator Author

@sultaniman added more context. Please see if it's okay.
Thanks !

@AstrakhantsevaAA AstrakhantsevaAA merged commit 2539429 into devel Mar 25, 2024
44 checks passed
@AstrakhantsevaAA AstrakhantsevaAA deleted the docs/incremental_loading_update branch March 25, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants