Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Row_number Over inside a transformation

  1. #1
    Join Date
    May 2017
    Posts
    3

    Default Row_number Over inside a transformation

    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
    Last edited by chrislopa; 10-05-2018 at 05:11 PM.

  2. #2
    Join Date
    May 2017
    Posts
    3

    Default

    Reading a little bit more the documenation, found the anwser on the: Add value fields changing sequence - basic example.ktr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.