Expanding Stages
Expanding stages run asynchronously on each row of the preceding stage's results. For example, if we have 5 rows containing an api endpoint in a url
column, we could use an expanding command (like the api
command) to operate on each row's api endpoint value in the url
column and make an api request to that endpoint. In an expanding stage, each row is operated on in isolation of the other rows.
Expanding stages, and the expanding commands that describe them are a powerful concept in the crul query language, as they allow for exploration, enrichment, and asynchronous operations on a set of results.
How to run an expanding stage?​
Certain commands in the crul query language are expanding operations. Whenever they are used, the stage containing the command will run as an expanding stage. Generally, commands that generate data, such as the api
command or the open
command, are expanding commands that will execute as expanding stages when run.