Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Extract data from Filename

  1. #1

    Question Extract data from Filename

    I'm trying to find a solution for -

    From a list of files, that has date in the filename, one of them need to be selected based on the latest date.

    Get Files --> Sort --> JavaScript

    the Get Files retrieve all the files, Sort by descending order (to identify the top one as the latest one) and the JavaScript to get the actual filename with the latest date on it.

    The problem I am facing here is - how to retrieve the one filename from the Sort step. I tried to use 'Select Values' and 'Copy rows to result' and none of them work.

    filename.getString() doesn't seem to give only one file name out of the bunch of files in that group.

    Please help....

  2. #2


    Hi singa,
    Group by step (after sort) should do the trick.
    In fact, you can get the first value, the last value,...



  3. #3


    Can you please tell me how to pick up the first value from Group By? I could n't do that in Java script by using value.getString(). I need to pick up just one of the file name from the list of files...any help is appreciated

    Thanks in advance

  4. #4


    Thanks samatar for the help I got it


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.