[英]Incremental data transfer using Azure Data Factory
In an on-premises SQL Server database, I have a number of tables in to which various sales data for a chain of stores is inserted during the day.在本地 SQL Server 数据库中,我有许多表,白天在其中插入了一系列商店的各种销售数据。 I would like to "harvest" these data to Azure every, say 15, minutes via Data Factory and an on-premises data management gateway.
我想通过数据工厂和本地数据管理网关每隔 15 分钟将这些数据“收集”到 Azure。 Clearly, I am not interested in copying all table data every 15 minutes, but only in copying the rows that have been inserted since last fetch.
显然,我对每 15 分钟复制一次所有表数据不感兴趣,而只对复制自上次提取以来插入的行感兴趣。 As far as I can see, the documentation suggests using data "slices" for this purpose.
据我所知, 文档建议为此目的使用数据“切片”。 However, as far as I can see, these slices require a timestamp (eg a datetime) column to exist on the tables where data is fetched from.
但是,据我所知,这些切片需要时间戳(例如日期时间)列存在于从中获取数据的表中。
Take Azure Data Factory out of the equation.将 Azure 数据工厂排除在外。 How do you arrange for transfer of deltas to a target system?
您如何安排将增量传输到目标系统? I think you have a few options:
我想你有几个选择:
EXCEPT
and MERGE
to work out what records have change;EXCEPT
和MERGE
出哪些记录发生了变化; obviously not ideal for large volumes, this would work for small volumes. HTH HTH
We are planning to add this capability into ADF.我们计划将此功能添加到 ADF 中。 It may start from sequential integer column instead of timestamp.
它可以从连续整数列而不是时间戳开始。 Could you please let me know if the sequential integer column will help?
你能告诉我顺序整数列是否有帮助吗?
By enabling "Change Tracking" on SQL Server, you can leverage on the "SYS_CHANGE_VERSION " to incrementally load data from On-premise SQL Server or Azure SQL Database via Azure Data Factory.通过在 SQL Server 上启用“更改跟踪”,您可以利用“SYS_CHANGE_VERSION”通过 Azure 数据工厂从本地 SQL Server 或 Azure SQL 数据库增量加载数据。
https://docs.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-change-tracking-feature-portal https://docs.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-change-tracking-feature-portal
If using SQL Server 2016, see https://msdn.microsoft.com/en-us/library/mt631669.aspx#Enabling-system-versioning-on-a-new-table-for-data-audit .如果使用 SQL Server 2016,请参阅https://msdn.microsoft.com/en-us/library/mt631669.aspx#Enabling-system-versioning-on-a-new-table-for-data-audit 。 Otherwise, you can implement the same using triggers.
否则,您可以使用触发器实现相同的功能。
And use NTP to synchronize your server time.并使用 NTP 同步您的服务器时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.