-
Notifications
You must be signed in to change notification settings - Fork 155
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
rest_api: Allow multiple resolve params in an endpoint config #1879
Comments
I'll add another vote to this enhancement! Currently working with an API that wants two different IDs in the endpoint to return
|
Hey @jecolvin thanks for the input. Could you please share how |
For sure! Edit: If it helps, the |
@burnash Followup on my work and a proposal for a v1 of this feature: I discovered I could get the @dlt.transformer(data_from=assignments, write_disposition="replace")
def subtasks(assignments):
@dlt.defer
def _get_subtasks(_assignment):
project_id = _assignment["assignable_id"]
assignment_id = _assignment["id"]
for page in client.paginate(
path=f"projects/{project_id}/assignments/{assignment_id}/subtasks",
params={"per_page": 250},
):
yield page
for _assignment in assignments:
yield _get_subtasks(_assignment) That might be a good v1 for multiple resolve params: You can declare multiple resolve params as long as they all come from the same resource. That way it should still be a single, straightforward transformer. |
dlt version
0.4.11
Source name
rest_api
Describe the problem
When trying to specify multiple resolve params I get the following exception:
Expected behavior
I can have an endless count of resolve params
Steps to reproduce
How you are using the source?
I run this source in production.
Operating system
macOS
Runtime environment
Local
Python version
3.11.4
dlt destination
duckdb
Additional information
Reported here: https://dlthub-community.slack.com/archives/C04DQA7JJN6/p1716833336657899?thread_ts=1716665462.485049&cid=C04DQA7JJN6
The text was updated successfully, but these errors were encountered: