Forum Discussion
__Vladimir__
Mar 09, 2021Copper Contributor
Incremental updates with overlap (delete last N days of records and load "NOW- M days" from source)
Hi, I am looking into the possibilities of replacing our current legacy ETL setup with Azure dedicated pool and Data Factory. The source will be PostgreSQL, the destination should be Azure dedicate...
iryna
Mar 10, 2021MCT
Hello,
to remove n days from destination before inserting records in field "pre-copy script" meter code similar to this:
declare @date date
declare @lastNdays int
set @lastNdays = -3
set @date = dateadd(d,@lastNdays, (select top 1 [LastDay] from [dbo].[table] order by [LastDay] desc))
delete from [dbo].[table] where [LastDay] >=@date