问题描述
我尝试了 bq
命令行工具,但似乎没有办法直接将结果写入GCS。我可以看到的唯一方法就是:
$ b $ ol
我正在寻找一种方法将结果直接写入GCS。
您无法直接将查询结果写入GCS。正如您已经指出的那样,最简单的方法是:
- 将查询结果写入输出表
- 将您的表格导出至GCS
您可以轻松地在网络用户界面中执行此操作。
您也可以编写一个管道,该管道使用 BigQuery.IO.Read.fromQuery(< your_query>)
,并将结果直接写入GCS。
I tried the bq
command line tool, but it there seems to be no way to write the results directly to GCS. The only way I can see is working is:
- query -> table -> export
- query -> console -> local CSV file -> upload to GCS
I'm looking for a way to directly write the results to GCS.
You cannot write your query results directly to GCS. The easiest way, as you've already pointed out, is to:
- Write your query results to an output table
- Export your table to GCS
You easily do this in the web UI.
You could also write a Dataflow pipeline that reads from BigQuery using BigQuery.IO.Read.fromQuery(<your_query>)
, and write the results directly to GCS.
这篇关于将BigQuery查询结果直接写入GCS - 是否有可能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!