-
Notifications
You must be signed in to change notification settings - Fork 67
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
Allow "from" operator to accept upstream input #4752
Comments
Note to self: The API-enabling variant of this definitely seems worthy of a blog post once it's done. |
We've been discussing this one as a team but have had uncertainty about the correct design approach, so we're putting the topic back on ice for a bit while we focus on other priorities. |
See #5324 (comment) for a semi-related topic. |
Verified in super commit f1213fa. For a very simple example of
Now we'll send an array of the filenames as input, and use the newly-added
For a more sophisticated example that shows the API use case, the current README for the super project shows this. Just to capture the point-in-top description of what's it's doing in the event it continues to evolve over time:
Thanks @mccanne! |
At the time of the filing of this issue, Zed is at commit 2689e24.
This topic was recently highlighted thanks to a user that asked the following question in a community Slack thread:
We ultimately helped the user by using proposing some shell glue with multiple invocations to
zq
. However, their experience exposed a limitation of the many input operators (from
operator et al): They currently can only sit at the "head" of a Zed pipeline. However, in this case the user ultimately wanted to take information from upstream in the Zed pipeline and make it part of an HTTP request, e.g., their pseudocode:Thinking about this in a more general way, @nwt recognized that the input operators could be changed so that when data comes from upstream, the operator could run itself and everything downstream once per
this
value that comes from the upstream. This would enable things such as:In a discussion of this topic, @nwt and @mccanne recognized that special care would need to be taken for the optimizer to remain effective despite this dynamic behavior.
In another more recent discussion about the API-enabling variant of this, @mccanne wondered if we might have some kind of async/pipeline flag that would allow for parallelizing the HTTP connections invoked. This would mean the order is not guaranteed across the results, so another flag could be used to guarantee order when that's needed.
The text was updated successfully, but these errors were encountered: