I am trying to perform a delta load (incremental load) with Azure Data Factory from SQL Server to Blob Storage. My tables have an updateStamp column that is Epoch Time in milliseconds, numeric(19,0) data type. When I look to select the Watermark column name in the configuration section of the Copy Data tool in ADF, it is not one of the options and it does not let me manually enter the column name. It looks like it only wants a datetime data type or key integer data type. I have tried with the Metadata-driven copy task and the Delta copy from Database template with no luck. Is there a work around or way of converting the max and using that (instead of adding another column to hundreds of millions of rows). Any help or guidance is appreciated.
I'm expecting to be able to use a data type that indicates a point in time as the watermark for an incremental load, even though that data type is not datetime.
I have tried to repro this in my environment using Delta copy from a database template in adf for the watermark column with epoch timestamp type. Below are the steps.
Create PROCEDURE update_watermark @LastModifyDate numeric(19,0)
AS
BEGIN
UPDATE watermarktable
SET [WatermarkValue] = @LastModifyDate
END
Configuration in LookupLastWaterMark, LookupCurrentWaterMark, DeltaCopyfromDB activities are not changed
In UpdateWaterMark activity, Stored procedure name is selected, and parameter is imported. type of the parameter LastModifyDate is given as Int64.
Debug is clicked for the pipeline run and pipeline parameters for Source, sink and control table are given.
Sink File:
Delta records are copied to sink when epoch timestamp is given as watermark column.
Reference: MS doc on Delta copy from a database template.