简体   繁体   English

为每一轮创建映射和显示运行,我还将第一次运行添加到第二次运行的总和中,第三次运行相同

[英]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个 1 1个
1 1个 2 2个 2 2个
1 1个 3 3个 4 4个
1 1个 4 4个 0 0
1 1个 5 5个 1 1个
1 1个 6 6个 2 2个
2 2个 1 1个 3 3个
2 2个 2 2个 1 1个
2 2个 3 3个 1 1个
2 2个 4 4个 4 4个
2 2个 5 5个 6 6个
2 2个 6 6个 0 0
3 3个 1 1个 2 2个
3 3个 2 2个 1 1个
3 3个 3 3个 1 1个
3 3个 4 4个 6 6个
3 3个 5 5个 0 0
3 3个 6 6个 4 4个

I Want to an output like this:我想要这样的 output:

Overs过度 Total_Runs总运行次数
1 1个 10 10
2 2个 25 25
3 3个 39 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 -解决方案 -

  1. Create an expression transformation with below ports - in below order.使用以下端口创建表达式转换 - 按以下顺序。 in - input port, v_variable port, out_* output port in - 输入端口,v_variable 端口,out_* output 端口
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
  1. Use an aggregator -使用聚合器 -
in_total_runs
in_out_overs -- group by this port
out_total_runs = max(in_total_runs)
  1. Attach in_out_overs and out_total_runs links to target.将 in_out_overs 和 out_total_runs 链接附加到目标。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ETL 数据在一列上,但将分区放在不同的列上。 我怎样才能更快地做到这一点? - ETL data over one column but put partition different column. How can I do it faster? 脚本在Unix中运行,但不在Informatica命令任务中运行 - Script runs in Unix but not in Informatica command task 为什么人们选择SnapLogic而不是信息解决方案进行云集成? - why do people choose SnapLogic over informatica for cloud integration? Informatica BDE 摄取作业运行 10 多个小时,当终止并重新运行时在 3 小时内完成 - Informatica BDE ingestion job runs for 10+ hours and when killed and rerun completes in 3 hrs 什么时候比 static 查找更喜欢动态查找? 我们可以使用动态 lkp 执行 SCD type2 吗? - When do prefer Dynamic Lookup over static lookup ? can we perform SCD type2 using dynamic lkp? 有时Informatica会成功运行,有时会出现错误“找不到数据源名称且未指定默认驱动程序” - Sometimes Informatica gets successful runs, sometimes it gets error “Data source name not found and no default driver specified” 在我的映射中,我有两个过滤器转换和两个目标表,但目标 object 将数据写入第一个目标,第二个目标为空 - In my mapping i have two filter transformations and two target tables but target object writing data into first target and second target is empty 在 Informatica Power Center 中,我想创建一个映射和三个 session,每个 session 的查询都不同,所以我该怎么做 - In informatica power center I want to create one mapping and three session and query of each session is different so how I do this 信息映射以计算每个组织中的雇员人数 - informatica mapping to count the no.of employees in each organisation 信息学。 我有 5 个会话的工作流程。 如何限制每个会话的行数以及在第二次运行中如何选择不同的记录? - Informatica. I have workflow with 5 sessions. How to limit no of rows for each session and in second run how to pick the different records?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM