Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: read input file with variable name

  1. #1
    Join Date
    Oct 2007
    Posts
    10

    Default read input file with variable name

    Hi

    I use Kettle last versione 3.0 RC2 on unix Sun Solaris.

    I have a directory with many files in the format like

    progr_dd-mm-yyyy-name.txt

    where dd=day mm=month yyyy=year

    when I run my trasformation I want to read the file with yesterday date.

    I try to use step getFiles but the regexp don't resolve my problem.

    Is possible to do it with the steps provide by default or variables ?
    Could you give me a trace of solution ?

    Thanks in advance
    Giovanni

  2. #2

    Default

    Hi Giovanni,

    I use a variable (defined in a previous job entry )

    wildcard = .*${YESTERDAY}.txt$

    where YESTERDAY is a variable :

    - System info (yesterday)
    - Java script : yesterday.dat2str("dd-mm-yyy") ;
    - set variable (YESTERDAY )

    Rgds

    Samatar

  3. #3
    Join Date
    Oct 2007
    Posts
    10

    Default

    thanks for suggestion, it's work fine.

    Regards
    Giovanni

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.