Pentaho- if min datetime group by a condition, set another field value to value1

Pentaho- if min datetime group by a condition, set another field value to value1

我是 Pentaho 的新手...有人可以帮我解决以下问题吗...

我的数据已经排序如下:

session, log_time, flag

1111, 2017-05-17 11:11:10,0

1111,2017-05-17 11:11:11,0

1111,2017-05-17 11:11:12,0

1111,2017-05-17 11:11:13,0

2222,2017-05-17 11:11:10,0

2222,2017-05-17 11:11:13,0

2222,2017-05-17 11:11:15,0

当会话分组最小 log_time 时,如何将标志值设置为 1?我希望得到如下结果:

session, log_time, flag

1111, 2017-05-17 11:11:10,**1**

1111,2017-05-17 11:11:11,0

1111,2017-05-17 11:11:12,0

1111,2017-05-17 11:11:13,0

2222,2017-05-17 11:11:10,**1**

2222,2017-05-17 11:11:13,0

2222,2017-05-17 11:11:15,0

只需 运行 通过 Add value fields changing sequence 即可得到以下信息:

然后您只能对 "sequence_value" 为 1 的值进行操作。请注意,该步骤需要排序的输入。