简体   繁体   English

MYSQL 变更数据捕获 (CDC) - Azure 服务(Azure 数据工厂)

[英]MYSQL Change Data Capture(CDC) - Azure Services (Azure data factory)

I want to perform ETL operation on the data tables of MYSQL Database and store the data in the azure data warehouse.我想对MYSQL数据库的数据表进行ETL操作,将数据存入azure数据仓库。 I do not have updated date column to identify a modified record over the period.我没有更新日期列来识别这段时间内修改过的记录。 How do I come to know which record is modified.我如何知道修改了哪个记录。 Does MYSQL database support CDC? MYSQL 数据库是否支持 CDC?

It is possible to read the MYSQL binlogs or binary logs using azure services (Azure data factory)?是否可以使用 azure 服务(Azure 数据工厂)读取 MYSQL 二进制日志或二进制日志?

If you can put together a single statement query that will return what you want using whatever functions and joins are available to you then you can put that into the sqlReaderQuery part of the ADF.如果您可以将单个语句查询放在一起,该查询将使用任何可用的函数和连接返回您想要的内容,那么您可以将其放入 ADF 的 sqlReaderQuery 部分。

Otherwise you might be able to use a stored procedure activity (sorry not so familiar with mySQL as I am ADF)否则,您可能可以使用存储过程活动(抱歉,我对 ADF 不太熟悉 mySQL)

Do you have any column which is increasing integer?你有任何增加整数的列吗? If so, you can still use lookup activity + copy activity + stored procedure activity to get incremental load.如果是这样,您仍然可以使用查找活动 + 复制活动 + 存储过程活动来获取增量负载。 More details are as following: https://docs.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-powershell更多详情如下: https : //docs.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-powershell

ADF do not have built-in support for CDC yet. ADF 还没有对 CDC 的内置支持。 You can do that through custom activity in ADF with your code.您可以使用代码通过 ADF 中的自定义活动来实现这一点。

In MySQL you have the option to add a timestamp column which updates on an update on rowlevel by default.在 MySQL 中,您可以选择添加一个时间戳列,默认情况下该列在行级别更新时更新。 A CDC is not available, but when you can to see the de difference you can compare the MAX(updatedate) on MySQL versus (>=) your own MAX(ETLDate) to get all the modified records. CDC 不可用,但是当您可以看到差异时,您可以比较 MySQL 上的 MAX(updatedate) 与 (>=) 您自己的 MAX(ETLDate) 以获取所有修改过的记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM