隐藏 bq 命令行 `query` 输出

Hide bq command line `query` output

我正在使用 bq 命令行工具从远程计算机执行查询,然后发送到特定表。 bq query 每次显示查询输出。 bq query 命令的 suppress/hide 输出的标志是什么?

使用 -n=0 选项 bq query。这是有和没有这个选项的例子:

$ bq query --use_legacy_sql=false "SELECT x FROM UNNEST([1, 2, 3]) AS x;"
Waiting on <job id> ... (0s) Current status: DONE   
+---+
| x |
+---+
| 1 |
| 2 |
| 3 |
+---+
$ bq query -n=0 --use_legacy_sql=false "SELECT x FROM UNNEST([1, 2, 3]) AS x;"
Waiting on <job id> ... (0s) Current status: DONE

文档仅供参考。

bq command-line tool reference

--max_rows=MAX_ROWS or -n=MAX_ROWS
An integer specifying the number of rows to return in the query results. The default value is 100.

其他输出行的命令,例如head 有相同的选项。