我正在设计一个解决方案,其中 Google Cloud SQL 将用于存储来自应用程序正常运行的所有数据(一种 OLTP 数据)。随着时间的推移,数据预计会增长到相当大的规模。数据本身本质上是关系数据,因此我们选择了 Cloud SQL 而不是 Cloud Datastore。
这些数据需要输入 Big Query 进行分析,这需要接近实时分析(作为最好的情况),尽管实际上可能会出现一些滞后。但我正在尝试设计一种解决方案,将这种延迟降至最低。
我的问题有 3 个部分 -
最佳答案
看看 WePay 如何做到这一点:
The MySQL to GCS operator executes a SELECT query against a MySQL table. The SELECT pulls all data greater than (or equal to) the last high watermark. The high watermark is either the primary key of the table (if the table is append-only), or a modification timestamp column (if the table receives updates). Again, the SELECT statement also goes back a bit in time (or rows) to catch potentially dropped rows from the last query (due to the issues mentioned above).
借助 Airflow,他们设法让 BigQuery 每 15 分钟与 MySQL 数据库同步一次。
关于google-bigquery - 如何将 Google Cloud SQL 与 Google Big Query 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46369952/