Is it possible to join using stdin?
Hi,
in the join command it's mandatory to set -f, then to set a filename.
Is it possible to do something like:
<input do something | mlr --csv join -j id -f stdin anotherFile
And is it possible to do something like this (apply a Miller verb before joining):
mlr --csv millerVerb file1 then join -j id -f millerVerbOutput anotherFile
Thank you
First one: currently it's not but I can look into it. I'd need to error out immediately if the command line specifies main input from stdin and join input from stdin, but, other than that it should work (with some code changes). Oh also, risk of confusion if one does two joins both taking input from stdin -- behavior would be weird.
As for the second: yes you can do that but file1 needs to go at the end.
http://johnkerl.org/miller/doc/cookbook.html#Doing_multiple_joins
@aborruso I figured out a workaround.
you can use the proc system, like this mlr --icsv --ojson tail -n 2 /proc/self/fd/0
https://xbin.io/w/tool/mlr