在pentaho中从ROWS获取最大值 [英] Fetching the max value from ROWS in pentaho
本文介绍了在pentaho中从ROWS获取最大值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表结构
ID Col_1 col_2 col_3 col_4
1 34 23 45 32
2 20 19 67 18
3 40 10 76 86
我在这里要从col_1,col_,col_3,col_4获得最大值,所以我的输出看起来像
I here want the max value from col_1,col_,col_3,col_4 so my output looks like
ID Col_1 col_2 col_3 col_4 max
1 34 23 45 32 45
2 20 19 67 18 67
3 40 10 76 86 86
任何帮助将不胜感激.
推荐答案
使用带有以下代码的修改的Java脚本值步骤:
Use a Modified Java Script Value step with the following code:
var max = Math.max(col_1,col_2,col_3,col_4);
这篇关于在pentaho中从ROWS获取最大值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文