根据Informatica中的第三列进行计数和过滤

发布于 2025-02-06 19:59:52 字数 361 浏览 2 评论 0 原文

就像我有一个问题一样

Col1        Col2 Col3
45321_320    A    Y
45321_320    A    N
76453-10     A    Y
45638_80     A    Y

,我们需要计算具有相同Col1的行的NO,例如前两个行被视为count = 2且休息为count = 1,然后count = 2或更多,该记录需要过滤。基于Col3 = Y,因此我们如何在Informatica

Like I have a question

Col1        Col2 Col3
45321_320    A    Y
45321_320    A    N
76453-10     A    Y
45638_80     A    Y

So we need to count the no of rows that have same col1 for example the first two rows should be considered as count=2 and rest as count=1 and after that count=2 or more that records need to filtered out on the basis of Col3=Y, so how we can do that in informatica

https://i.sstatic.net/JkxnG.png

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

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

发布评论

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

评论(1

云之铃。 2025-02-13 19:59:52

这有点棘手。请按照以下步骤进行操作。

  1. 对Col1上的数据库进行排序。
  2. 使用agg汇总。创建一个名为count_col1的新Col。
    创建另一个col,cnt_col3_y = count(*,col3 = y)
  3. 与基于col1的分子输出加入AGG输出。
  4. 放一个过滤器。逻辑应为
iif( count_col1>1 and cnt_col3>0, false, true)
  1. 过滤器的链接输出到目标。

这将产生下面的输出。

Col1        Col2 Col3
76453-10     A    Y
45638_80     A    Y

如果您想要其他输出,请告诉我。

This is little tricky. Pls follow below steps.

  1. Sort the data base on col1.
  2. Use agg to aggregate. Create a new col called count_col1.
    create another col, cnt_col3_y = count(*, col3=y)
  3. Join agg output with sorter output based on col1.
  4. Put a filter. Logic should be
iif( count_col1>1 and cnt_col3>0, false, true)
  1. Link output of filter to target.

This will generate output like below.

Col1        Col2 Col3
76453-10     A    Y
45638_80     A    Y

If you want different output let me know.

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