如果下次在Informatica Power Center中出现同一记录,请获得标志的输出

发布于 2025-02-08 08:40:54 字数 995 浏览 2 评论 0原文

如果记录再次来自Informatica Power Center中的消息来源,我需要放置标志 这需要在Informatica Power Center中实现。之后,我将使用过滤器转换将FLAG = 1记录传递到输出。基本上,我需要在目标表中跟踪更改的标志和加载记录作为SCD 2。

Input
Number        Code     Date
1234          3        2022/01/22
1234          3        2022/01/23
1234          4        2022/01/24
1234          3        2022/01/25
1234          3        2022/01/26
1234          2        2022/01/27
1234          4        2022/01/28
4567          1        2022/01/29
4567          1        2022/01/20
4567          3        2022/01/21

Output
Number        Code     Date             Flag
1234          3        2022/01/22         1
1234          3        2022/01/23         2
1234          4        2022/01/24         1
1234          3        2022/01/25         1
1234          3        2022/01/26         2
1234          2        2022/01/27         1
4567          1        2022/01/29         1
4567          1        2022/01/20         2
4567          3        2022/01/21         1

I need to put flag if records again comes from source in informatica power center
This need to achieve in informatica power center. After that I will use filter transformation to pass only flag =1 records to output. Basically I need to track changed record of flag and load as scd 2 in target table.

Input
Number        Code     Date
1234          3        2022/01/22
1234          3        2022/01/23
1234          4        2022/01/24
1234          3        2022/01/25
1234          3        2022/01/26
1234          2        2022/01/27
1234          4        2022/01/28
4567          1        2022/01/29
4567          1        2022/01/20
4567          3        2022/01/21

Output
Number        Code     Date             Flag
1234          3        2022/01/22         1
1234          3        2022/01/23         2
1234          4        2022/01/24         1
1234          3        2022/01/25         1
1234          3        2022/01/26         2
1234          2        2022/01/27         1
4567          1        2022/01/29         1
4567          1        2022/01/20         2
4567          3        2022/01/21         1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡笑忘祈一世凡恋 2025-02-15 08:40:55

您需要在表达式转换中使用变量端口来跟踪上一个记录中的值,并根据值是否更改设置标志。

因为Informatica评估了变量端口,因此如果将当前记录(输入端口)与上一个记录(变量端口X)进行比较的变量端口(变量端口X)是在变量端口X之前,则可变端口X将从上一个记录中保存值。

有很多详细的示例,如果您为它们进行Google for google,例如此一个

You need to use variable ports in an expression transformation to track values in the previous record and set a flag depending on whether a value has changed or not.

Because Informatica evaluates variable ports in order, if the variable port that compares the current record (input port) with the previous record (variable port x) is before variable port x, variable port x will hold the value from the previous record.

There are plenty of detailed examples of this common pattern if you google for them e.g. this one

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文