如何下载Google BigQuery数据集中的所有数据? [英] How to download all data in a Google BigQuery dataset?

查看:489
本文介绍了如何下载Google BigQuery数据集中的所有数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种简单的方法可以直接下载Google BigQuery上的特定数据集中包含的所有数据?我实际上下载了作为csv,一个接一个地查询,但它不允许我获得超过15k行,而我需要下载的行超过5M。
谢谢

解决方案

您可以使用Web UI,命令行工具或BigQuery运行BigQuery提取作业API。例如,使用命令行工具:



首先使用这些命令安装和验证说明:
https://developers.google.com/bigquery/bq-command-然后确保您拥有可用的Google云端存储分组(请参阅

然后,运行以下命令:
bq提取my_dataset.my_table gs://mybucket/myfilename.csv

更多关于通过API在这里提取数据的信息:
https://developers.google.com/bigquery/exporting-data-from-bigquery


Is there an easy way to directly download all the data contained in a certain dataset on Google BigQuery? I'm actually downloading "as csv", making one query after another, but it doesn't allow me to get more than 15k rows, and rows i need to download are over 5M. Thank you

解决方案

You can run BigQuery extraction jobs using the Web UI, the command line tool, or the BigQuery API. The data can be extracted

For example, using the command line tool:

First install and auth using these instructions: https://developers.google.com/bigquery/bq-command-line-tool-quickstart

Then make sure you have an available Google Cloud Storage bucket (see Google Cloud Console for this purpose).

Then, run the following command: bq extract my_dataset.my_table gs://mybucket/myfilename.csv

More on extracting data via API here: https://developers.google.com/bigquery/exporting-data-from-bigquery

这篇关于如何下载Google BigQuery数据集中的所有数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆