Hi.
I have to create transformation and I need to create a sequence number that will get reset after x amount of rows. On SQL I would use a row_number() over (partition by... order by) function, but not sure how to create this on pentaho?
Ex:
Source data
login -- role -- sequence (row number) that i need to generate
1 -- a -- 1
1 -- b -- 2
2 -- c -- 1
2 -- r -- 2
2 -- a -- 3
3 -- a -- 1
4 -- a -- 1
4 -- b -- 2
5 -- a -- 1
I have tried the "group by" step but it doesn't have an option to reset the count
Any help will be appreciated.
Christiam
I have to create transformation and I need to create a sequence number that will get reset after x amount of rows. On SQL I would use a row_number() over (partition by... order by) function, but not sure how to create this on pentaho?
Ex:
Source data
login -- role -- sequence (row number) that i need to generate
1 -- a -- 1
1 -- b -- 2
2 -- c -- 1
2 -- r -- 2
2 -- a -- 3
3 -- a -- 1
4 -- a -- 1
4 -- b -- 2
5 -- a -- 1
I have tried the "group by" step but it doesn't have an option to reset the count
Any help will be appreciated.
Christiam