dlt-hub / verified-sources

Contribute to dlt verified sources 🔥
https://dlthub.com/docs/walkthroughs/add-a-verified-source
Apache License 2.0
48 stars 38 forks source link

RESTAPI: Handle resolve params which return a list of elements #482

Open francescomucio opened 1 month ago

francescomucio commented 1 month ago

Tell us what you do here

I modified the method that builds the path for resolve params

Short description

I introduced an internal method (to_list()) to convert the value returned by the parent resource to a Python list:

Then process_parent_data_item() is returning not a single path but a list of paths, then paginate_dependent_resource needs to yield values from all the paths in the list.

Additional Context

This is a fairy common use case for APIs returning multiple elements from a search endpoint