如何将Google扳手查询结果导出到.csv或Google表格? [英] How to export Google spanner query results to .csv or google sheets?
问题描述
我是Google扳手的新手,我运行了一个查询,发现约有5万行数据.我想将该结果集导出到本地计算机(如.csv)或google表格中.以前,我在有导出按钮的地方使用过TOAD,但在这里看不到任何这些选项.有什么建议请.
I am new to google spanner and I have run a query and found about 50k rows of data. I want to export that resultset to my local machine like .csv or into a google sheet. Previously I have used TOAD where I have an export button, but here I do not see any of those options. Any suggestions please.
推荐答案
gcloud spanner databases execute-sql
命令允许您在命令行上运行SQL语句并将输出重定向到文件.
--format=csv
全局参数应以CSV输出.
The gcloud spanner databases execute-sql
command allows you to run SQL statements on the command line and redirect output to a file.
The --format=csv
global argument should output in CSV.
https://cloud.google.com/spanner/docs/gcloud-spanner https://cloud.google.com/sdk/gcloud/reference/
这篇关于如何将Google扳手查询结果导出到.csv或Google表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!