将 Google Cloud SQL 数据导入 BigQuery 的最佳方式 [英] Best way to import Google Cloud SQL data into BigQuery

查看:30
本文介绍了将 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 界面不允许我从 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. 按照 CSV 格式从 Cloud SQL 实例中所需的表中导出数据,如在文档中.
  2. 按照同样解释的过程将 CSV 数据导入您想要的 BigQuery 表 在文档中.

你已经完成了.如果您的数据库很大并且有很多表,您可能希望以编程方式进行导入,使用 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 的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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