One thing that would be very useful is an option to emit column headers in the output, analogous to -H for input. These would be based on either the column names in the select, or aliases provided. Amongst other things this would allow composability of inputs and outputs.
E.g.
SELECT * FROM my.tsv ==> preserves original columns
SELECT a,b FROM my.tsv ==> first line is a,b
SELECT a AS c1, b AS c2 from my.tsv ==> first line is c1,c2
q is a marvelous tool, thank you!
One thing that would be very useful is an option to emit column headers in the output, analogous to
-H
for input. These would be based on either the column names in the select, or aliases provided. Amongst other things this would allow composability of inputs and outputs.E.g.
SELECT * FROM my.tsv
==> preserves original columnsSELECT a,b FROM my.tsv
==> first line isa,b
SELECT a AS c1, b AS c2 from my.tsv
==> first line isc1,c2