|
|
|
|
|
by seanhunter
616 days ago
|
|
That doesn't match my experience at all. Every database I'm aware of has multiple options for data export and import for batch and command processing in the standard tooling. CSV is almost never "the best you can get". What is going to be best depends on your use case, and indeed at a bare minimum you can almost always change the field and line seperators and get something that works just fine on the commandline and avoids most of the stuff people find hard about CSV. Additionally, if people like jq, they don't need a special tool like this. They can just get the database to output json and use json/jq - another tool isn't needed. In postgres you can do something like this select array_to_json(array_agg(row_to_json (r))) from (
... put your sql query here...
) r;
...and postgres will output a json array for you where each item in the array is a json map of a single row of the output.I'm sure other databases have similar functionality. |
|