Description
It would be very useful to have an ability to print in the cbq tool only the results of the request for scripting purposes. without the metadata of the request. especially in places jq tool is not available.
for example currently this line, takes a query from a file, and print the results to another file, quietly
/opt/couchbase/bin/cbq -e http://hostname:8091 -q -u username -pretty=false -l cbq_log.txt -f query.n1ql -o cbq_out.txt
resutls are printed as follows:
{
|
"requestID": "0b965c25-ff59-49ca-9362-67a563cf4dae", |
"signature": {"address":"json","name":"json"}, |
"results": [ |
{...},
|
{...}
|
],
|
"status": "success", |
"metrics": {"elapsedTime": "18.079943038s","executionTime": "18.07984059s","resultCount": 10,"resultSize": 688} |
}
|
instead of maybe just the array of the resutls,
which would run as a command
/opt/couchbase/bin/cbq -e http://hostname:8091-q -u username -pretty=false -nometa=true -l cbq_log.txt -f query.n1ql -o cbq_out.txt
[
|
{...},
|
{...}
|
]
|
Roi.
Attachments
Issue Links
- relates to
-
MB-48489 Add command line option to cbq to switch to terse output
- Closed