Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
21–30 of 81 posts
License is unclear.
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#22There's also xsv:
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#23Does anyone happen to know of similar or generally useful tools for dealing with YAML files? Would ideally like to be able to run SQL-like queries.
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#24I made a little tool called SQLBong that does something similar by embedding Sqlite3 under the hood: https://github.com/sordina/SQLBong
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#25[deleted]
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#26Nothing wrong with this approach I suppose but wouldn't most people be better off to just use a database for this sort of thing?
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#27Nothing wrong with this approach I suppose but wouldn't most people be better off to just use a database for this sort of thing?
Depends on your familiarity with the unix toolset vs use cases, an amusing (if somewhat contrived) example of this:
http://aadrake.com/command-line-tools-can-be-235x-faster-tha...
Most CSV analysis is static, not something ongoing with inserts/updates/etc, so using a combination of unix tools to handle the data processing seems like a sufficient solution for many scenarios.
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#28Nothing wrong with this approach I suppose but wouldn't most people be better off to just use a database for this sort of thing?
I use CSV all the time because I am constantly generating new datasets and it is nice to be able to literally cat|pbcopy them and paste them into DataGraph to see the results. Every major language has some sort of csv reader (usually into a dataframe type object) which makes it very easy to work with. Databases in my experience are laborious to set up and I would need to learn the API rather than just println("a,b,c,d").
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#29the little known csvfix (https://bitbucket.org/neilb/csvfix) is pretty good too.
Re: Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
#30Can anyone suggest something similar for Windows?
PowerShell can handle CSV files natively.
Here are the equivalent commands from the article:
Import-Csv example.csv | Select-Object year, price | Export-Csv -NoTypeInformation example-cut.csv
Import-Csv example.csv | Sort-Object year | Export-Csv -NoTypeInformation example-sorted.csv
Import-Csv example.csv | Where-Object year -eq 1999 | Export-Csv -NoTypeInformation example-filtered.csv
PowerShell can also deal with JSON and XML in much the same way.