本文介绍了将Google Cloud SQL数据导入BigQuery的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Cloud SQL实例中有一个数据库.我想将其内容复制到BigQuery中以进行分析.不需要我不断更新BigQuery数据集.如果只导出一次,就可以了.

I have a database in a Cloud SQL instance. I would like to copy its content into BigQuery in order to perform analysis.It is not a requirement for me to continuously update the BigQuery dataset. It is OK if the export is done only once.

实现此目标的最佳方法是什么?

What is the best way to achieve this?

创建表" BigQuery UI不允许我从Cloud SQL(仅文件,云存储,驱动器或BigTable)导入.

The 'Create Table' BigQuery UI does not allow me to import from Cloud SQL (only File, Cloud Storage, Drive or BigTable).

推荐答案

到目前为止,还没有自动工具可以将数据从Cloud SQL导入BigQuery,因此您可以遵循以下步骤:

Up to now, there is no automated tool to import data into BigQuery from Cloud SQL, so a procedure you can follow consists in:

  1. 按照文档中的.
  2. 按照该过程将CSV数据导入到所需的BigQuery表中,还说明了在文档中.
  1. Export the data from the table you want in your Cloud SQL instance in CSV format, as explained in the documentation.
  2. Import the CSV data into the BigQuery table you want following the procedure also explained in the documentation.

您完成了.如果您的数据库很大且有很多表,则可能要以编程方式进行导入,使用API​​ .

You are done. If your database is large and has many tables, you may want to do the import programatically, using the API.

这篇关于将Google Cloud SQL数据导入BigQuery的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 11:51