Stream ?
ADMIN
Stream is a new return type of Query All Records that is used exclusively with For Each Loops. Stream retrieves database records in a memory-friendly way to be used in your For Each Loop. This new feature is especially useful when using large datasets that would normally require recursive function stacks.
Comments
-
@Michael Udinski this is a great feature!
I am processing large lists of data using "for each loop" but data is obtained mainly via external apis.
Is there a way to apply "stream" to other lists of objects (that are not obtained via "Query All Records") to avoid timeouts?
Example: I'm getting 1000 json objects from an external api and want to modify them in Xano using "For each loop" and then post all the transformed json objects to another external api.
What I've done in cases like this is getting the 1000 json objects in a custom function that calls the external api multiple times getting 100 objects per call (using paging) and generates an array with all the retrieved objects.
This new array of 1000 objects (which is the response of the custom function), is now used as input in "For each loop", where I run transformations to the data of each object.
Is this a good practice? Would it still be a good practice if they where 10,000 objects instead of 1000?
I'd appreciate any insights. Thanks!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback