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: rest_api: add documentation for map and filter processing steps #1704

Closed
burnash opened this issue Aug 16, 2024 · 0 comments · Fixed by #1872
Closed

Docs: rest_api: add documentation for map and filter processing steps #1704

burnash opened this issue Aug 16, 2024 · 0 comments · Fixed by #1872
Labels
documentation Improvements or additions to documentation

Comments

@burnash
Copy link
Collaborator

burnash commented Aug 16, 2024

Description

Since dlt-hub/verified-sources#495 is merged it is now possible to use map and filter functions on the resources generated by rest_api:

config: RESTAPIConfig = {
    "client": {
        "base_url": "https://api.example.com",
    },
    "resources": [
        {
            "name": "posts",
            "endpoint": "posts",
            "processing_steps": [
                {"map": lambda x: x["id"] * 10},
                {"filter": lambda x: x["id"] > 10},
            ],
        },
    ],
}

Task

Update rest_api source documentation covering use cases for this feature. Use relevant tests from dlt-hub/verified-sources#495 to derive code examples.

@burnash burnash added the documentation Improvements or additions to documentation label Aug 16, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant