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

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

问题描述

是否有一种简单的方法可以直接在 Google BigQuery 上下载某个数据集中包含的所有数据?我实际上正在下载作为 csv",进行一个又一个查询,但它不允许我获得超过 15k 行,而我需要下载的行超过 5M.谢谢

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

推荐答案

您可以使用 Web UI、命令行工具或 BigQuery API 运行 BigQuery 提取作业.可以提取数据

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

例如使用命令行工具:

首先使用以下说明进行安装和身份验证:https://developers.google.com/bigquery/bq-command-线工具快速入门

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

然后确保您有一个可用的 Google Cloud Storage 存储分区(请参阅 Google Cloud控制台用于此目的).

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

然后,运行以下命令:

bq extract my_dataset.my_table gs://mybucket/myfilename.csv

有关通过 API 提取数据的更多信息,请访问:https://developers.google.com/bigquery/exporting-data-from-大查询

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

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

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