How can i suppress column headings?
If I'm exporting to csv, i don't need to see headings for every row. Thank you!
Can you elaborate a little? Perhaps if you paste the current output and the desired output we can help you.
I'll elaborate on what I'm looking for that brought me to this open issue... I'm trying to find the equivalent to the mysql commandline's --skip-column-names option.
Notably, when I enter mycli -e "tableformat csv; show status;" I get the following output:
"Variable_name","Value"
"Aborted_clients","96"
"Aborted_connects","45"
"Access_denied_errors","0"
...
I'd really like to avoid that top line of column headers. Thus brought me to an open issue discussing "suppress column headings".
I'm looking for the same answer.
My intention is to export result of SELECT trace FROM information_schema.optimizer_trace; into a result.json file to investigate it further.
At the moment, I'm using these steps to generate the file:
\o -o result.json
\T plain
SELECT trace FROM information_schema.optimizer_trace;
However this still includes the name of the column in the result.json, making the JSON invalid:
trace
{
"steps": [
...
The same question asked in Gitter chat: https://gitter.im/dbcli/mycli?at=5e41f921b612cc7bb15c7a9d
Adding a parameter to exclude headers here might solve this:
https://github.com/dbcli/mycli/blob/51df80d25d7e7bd098bcda198b00e7e6fed7f706/mycli/sqlexecute.py#L272
That's a lot of valid points. Let's make the following changes:
- options for the csv format. We already have csv and csv-tab, a better solution would be to have something like
csv --delimiter="\t" --headers=false
minimalformat, as suggested on gitter: the same as plain, but without column titles- JSON format, maybe also with options.