Miller is a welcome addition to my toolbox. I just wish it was as 'easy' to use as jq... part of that might be how infrequently I work with CSVs
Huh? jq has far more difficult syntax...
Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
41–50 of 109 posts
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#42Even without aliases, I still prefer PowerShell on Windows. Once you've turned the text into an object, you can pipeline it to hell. Get-Content .\example.csv | ConvertFrom-Csv | Where-Object -Property color -eq red
No thank you. I appreciate the power, speed, simplicity and flexibility of UNIX/GNU style text tools. I-Also-Don't-Want-To-Be-Locked-Into-This-Ridiculous-Syntax-Nightmare.
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#43Earlier quoted context omitted.
Can you share some of the reasons you don't like it?
While powershell has gotten a lot faster in the most recent versions its still pretty slow for anything involving computation; most of the type my equivalent python code beats the pants off of it. The expressiveness is nice, but oftentimes modules won't support it or require weird ways of using the data to get the performance you want (mostly by dropping out of the pipe.) The choices around Format- vs Out- vs Convert…
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#44Miller is a welcome addition to my toolbox. I just wish it was as 'easy' to use as jq... part of that might be how infrequently I work with CSVs
Huh? jq has far more difficult syntax...
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#45Discussion of a similar tool last month: yq: command-line YAML, JSON, XML, CSV and properties processor https://news.ycombinator.com/item?id=34656022 Also mentions gojq, Benthos, xsv, Damsel, a 2nd yq, htmlq, cfn-flip, csvq, zq, and zsv.
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#46How is it better that SQL for these tasks on tabular data? That's the first question I have after reading the title. Haven't read the article. Edited the first sentence. Originally it was "Why it is not called SQL if works on tabular data?". My point, if one wants cat, sort, sed, join on tabular data, SOL is exactly that. Awk is too powerful, not sure about it.
> How is it better that SQL for these tasks on tabular data? It has far better handling of a CSV/TSV file on the command line directly and is compasable in shell pipelines. > My point, if one wants cat, sort, sed, join on tabular data, SOL is exactly that. SQL is a language for data in the form of tables in relational databases. While it can do sorting or joining or some changes, it is meant for a different domain th…
https://towardsdatascience.com/analyze-csvs-with-sql-in-comm...
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#47Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#48Earlier quoted context omitted.
It's indeed written in Go now, which indeed has GC, and ultimately all memory is freed ... but there are indeed some issues around intermediate retention of memory, taking more memory than one would have expected. Some gains were made on https://github.com/johnkerl/miller/pull/1133 and https://github.com/johnkerl/miller/pull/1132
See also https://github.com/johnkerl/miller/issues/1119
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#49Looks cool! It'd help to have some more full examples (including output) of what some common use-cases do in the README. After looking through this, I'm still scratching my head trying to think of what problem this could solve in my own practice, and I work with a lot of csv files daily
That said, the most recent invocation for me was `mlr --icsv --ojson cat < a515b308-9a0e-4e4e-99a2-eafaa6159762.csv` to fix up CloudTrail csv and after that I happen to be more muscle-memory with jq but conceptually next I could have `filter '$eventname == "CreateNodegroup"'`
Re: Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON
#50Discussion of a similar tool last month: yq: command-line YAML, JSON, XML, CSV and properties processor https://news.ycombinator.com/item?id=34656022 Also mentions gojq, Benthos, xsv, Damsel, a 2nd yq, htmlq, cfn-flip, csvq, zq, and zsv.
Seems like you meant https://github.com/TomWright/dasel (instead of damsel)