-
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
union with count limit #4937
Comments
Hi @allukaZod! Thanks for your interest in Zed. In your final table output below, I think you probably meant to have some entries with |
Hello again @allukaZod. I've got something close to what you were seeking. The approach using the currently-available building blocks in Zed creates the full sets via Here's the user-defined operator in a file called
And some sample data in a file
And an example that ties it all together:
However, I did bump into a new bug #4943 while working on this. The effects are evident if we use batch the same input data into groups of three.
i.e., for Anyway, I figured I'd share what I've got thus far in case you can make use of it despite that bug. I'll update again when we have that fix for #4943. Let me know if you have any other questions in the meantime. |
Thanks a lot for the suggestion, that's exactly what Im looking for! Ane yes, some_cat2 shour be the other group. |
@allukaZod: Not sure if you're still watching this issue, but FYI, the issue #4943 I mentioned above has been fixed, so that last example shown previously now generates the correct expected output.
This fix is currently in Zed's tip of |
Hi,
Thank you for the great tool.
Here is my problem:
when dealing with large amount set of data, such as
When use
union
function to union ip by category or tag, the zq command is:union(ip) by category
.The result would be a large list of ip, such as
What I want was to set a limit in union, to limit the length of "union", and split this union with at most the number of limit. For example above, if I set the limit to be 2,
union(ip) by category limit 2
, the result would be:The text was updated successfully, but these errors were encountered: