如何在Informatica中获取列的最大值? [英] How to get max of a column in informatica?

查看:108
本文介绍了如何在Informatica中获取列的最大值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Informatica世界的新手

I am new to Informatica world

我的来源就是这样

emp_id|emp_name|emp_sal
1     |  A     |   2500
2     |  C     |   2800
3     |  M     |   2100

我希望目标像这样.

emp_id|emp_name|emp_sal|maximum_salary
1     |    A   |  2500 |  2800
2     |    C   |  2800 |  2800
3     |    M   |  2100 |  2800

请大家帮忙:) 谢谢

推荐答案

根据性能的观点,我们需要使用最少数量的转换,并尝试减少Joiner,Aggregator等阻塞转换.

According to the performance point of view, we need to use minimum number of transformations and try to reduce the blocking transformations like Joiner, Aggregator.

在这里,我们可以通过两种转换来实现这一目标.

Here we can achieve this in two transformations.

 SQ --> Sorter --> Expression --> Output

在Sorter中,排序键为emp_sal作为descending

In Sorter, Sort key is emp_sal as descending

Max Salary在表达式转换中的表达

Expression for Max Salary in Expression Transformation

Variable_Input1 - Variable_Input2
Input - emp_sal
Variable_Input2 - (IIF(Input > Variable_Input1, Input, Variable_Input1))
Output - Variable_Input2

注意:Variable_Input1&的数据类型; Variable_Input2为整数

Note: Datatype for Variable_Input1 & Variable_Input2 is Integer

希望这会有所帮助.

这篇关于如何在Informatica中获取列的最大值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆