noborus / trdsql

CLI tool that can execute SQL queries on CSV, LTSV, JSON, YAML and TBLN. Can output to various formats.
https://noborus.github.io/trdsql/
MIT License
1.96k stars 73 forks source link

Support shell text utilities for string functions #134

Open amitbha opened 4 years ago

amitbha commented 4 years ago

The sqlite string functions are not powerful. How about provide a function to use shell utilities like grep, awk, sed etc.? ex. trdsql -ih -oh "select shell(grep -oP '[[:digit:]]{5}', c1) as num from d.csv"

noborus commented 4 years ago

Thank you for your suggestion.

The sqlite string functions are not powerful.

I agree, the sqlite3 function may be inconvenient. However, I think it's hard to implement a shell call for every column. I thought shell call was possible instead of a table.

amitbha commented 4 years ago

U r right. I find some shell tools for manipulating csv data. Trdsql should focus on query csv. https://github.com/shenwei356/csvtk https://github.com/johnkerl/miller http://csvfix.byethost5.com/csvfix.htm