Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Load a text file in reverse order

  1. #1

    Default Load a text file in reverse order

    Can we load the rows in a text file in reverse order? I want to load the last 200K rows.

  2. #2
    Join Date
    Nov 2013
    Posts
    382

    Default

    Select 'Rownum in output' and add a filter step. Sort descending by rownum if you really need them in reverse order.

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by smahankali View Post
    Can we load the rows in a text file in reverse order?
    No, you only can rearrange the rows explicitely - as DepButi describes.

    Quote Originally Posted by smahankali View Post
    I want to load the last 200K rows.
    If you know the number of rows in the file, you should configure Text File Input to skip a certain number of rows.
    So long, and thanks for all the fish.

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    The Group By step can add the number of rows to each row (include all rows option) so the filter advice still somewhat applies. The Java Filter would be easier, something like "nrRows-rowNr<200000"

  5. #5

    Default

    Thanks for everyone for your suggestions.

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.