具有批次 ID 的 SSIS 类型 2 scd
我想修改标准 SSIS SCD 行为。
EmployeeID 是我的业务密钥,职称、名字、姓氏是类型 2 属性。 我希望 BatchLogID 能够反映更改发生的时间 - 否则它保持不变。
传递到数据流
BatchLogID 作为 int EmployeeID,title,firstname,lastname,BatchLogID,startdate,enddate
源数据
101,Miss,Jane,Smith,101 -- 首次插入
101,Miss,Jane,Smith,102 进程运行
101 ,Jane,Smith 小姐,103 进程运行
101,Miss,Jane,Smith,104 进程运行
101,Mrs, Jane,Brown,105 进程运行 -- 仅当数据发生更改时我才希望目标中的批次号更新
目标数据
101,Miss ,Jane,Smith,101,101,1 jan 2000,null--首次插入
101,Miss,Jane,Smith,105,105,1 jan 2000,5 Jan 2000 -- 当检测到更改时,数据会更新
101,Mrs, Jane,Brown,105,105 jan 2000,null-- 仅当数据更改为 I 时想要更新批次号
有什么想法吗?
I want to modify standard SSIS SCD behavior.
EmployeeID is my business key and title, firstname, lastname are type 2 attributes.
I want BatchLogID to reflect when a change occurred - otherwise it remains unchanged.
BatchLogID is passed to dataflow as an int
EmployeeID,title,firstname,lastname,BatchLogID,startdate,enddate
source data
101,Miss,Jane,Smith,101 -- inserted for first time
101,Miss,Jane,Smith,102 process runs
101,Miss,Jane,Smith,103 process runs
101,Miss,Jane,Smith,104 process runs
101,Mrs, Jane,Brown,105 process runs -- only when data has changed do I want the Batch number in target updated
target data
101,Miss,Jane,Smith,101,101,1 jan 2000,null-- inserted for first time
101,Miss,Jane,Smith,105,105,1 jan 2000,5 Jan 2000 -- as a change is detected the data is updated
101,Mrs, Jane,Brown,105,105 jan 2000,null-- only when data has changed to I want the Batch number updated
any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要使用以下方法执行增量加载:
要了解更多信息:
https://www.c-sharpcorner.com/article/design-the-full-load-and-delta-load-patterns-in-ssis/
You may need to perform delta load using :
To know more :
https://www.c-sharpcorner.com/article/design-the-full-load-and-delta-load-patterns-in-ssis/
使用了 sql merge 命令 - 必须清洗两次
Used a sql merge command - had to wash through twice for