[英]Create the Mapping & Display Runs For Each Over & I Also Add First Over Runs in the Sum of Second Over Runs & Same for Third Over
Source table Cricket_Score
:源表
Cricket_Score
:
Overs![]() |
Balls![]() |
Runs![]() |
---|---|---|
1 ![]() |
1 ![]() |
1 ![]() |
1 ![]() |
2 ![]() |
2 ![]() |
1 ![]() |
3 ![]() |
4 ![]() |
1 ![]() |
4 ![]() |
0 ![]() |
1 ![]() |
5 ![]() |
1 ![]() |
1 ![]() |
6 ![]() |
2 ![]() |
2 ![]() |
1 ![]() |
3 ![]() |
2 ![]() |
2 ![]() |
1 ![]() |
2 ![]() |
3 ![]() |
1 ![]() |
2 ![]() |
4 ![]() |
4 ![]() |
2 ![]() |
5 ![]() |
6 ![]() |
2 ![]() |
6 ![]() |
0 ![]() |
3 ![]() |
1 ![]() |
2 ![]() |
3 ![]() |
2 ![]() |
1 ![]() |
3 ![]() |
3 ![]() |
1 ![]() |
3 ![]() |
4 ![]() |
6 ![]() |
3 ![]() |
5 ![]() |
0 ![]() |
3 ![]() |
6 ![]() |
4 ![]() |
I Want to an output like this:我想要这样的 output:
Overs![]() |
Total_Runs![]() |
---|---|
1 ![]() |
10 ![]() |
2 ![]() |
25 ![]() |
3 ![]() |
39 ![]() |
Description: - For First Over means First 6 Balls I Want Sum of First 6 Balls that is 10. & For Second 6 Balls I Want Sum of First 6 Balls [Over] + Second 6 Balls That is 25 [10 + 15 = 25].描述: -对于第一个球意味着前 6 个球,我想要前 6 个球的总和,即 10。对于第二个 6 个球,我想要前 6 个球的总和 [Over] + 第二个 6 个球,即 25 [10 + 15 = 25] . & For Third 6 Balls I Want Sum of First 6 Balls [Over] + Second 6 Balls + Third ^ Balls That is 39 [10 + 15 + 14 = 39].
对于第三个 6 个球,我想要前 6 个球的总和 [Over] + 第二个 6 个球 + 第三个 ^ 球,即 39 [10 + 15 + 14 = 39]。
Note: - 6 balls means one over.注意: - 6 个球意味着一球。
How to create a mapping in for this scenario in Informatica / which logic should I use?如何在 Informatica 中为这种情况创建映射/我应该使用哪种逻辑?
i will assume your data is EXACTLY like you have shown in your question.我会假设您的数据与您在问题中显示的完全一样。 If its not like this in source then it will be a major issue.
如果它在源代码中不是这样,那么这将是一个主要问题。 If its a table where data is not sorted, it will be an issue.
如果它是一个数据未排序的表,那将是一个问题。
Solution -解决方案 -
in_balls
in_runs
in_overs
v_cumulative_runs= in_runs+ iif(isnull(v_cumulative_run),0,v_cumulative_run)
out_total_runs=v_cumulative_runs
out_overs=in_overs
in_total_runs
in_out_overs -- group by this port
out_total_runs = max(in_total_runs)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.