Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: KETTLE Transformation - files in a folder

  1. #1
    Join Date
    Jul 2008
    Posts
    10

    Default KETTLE Transformation - files in a folder

    Hi all,

    am new to KETTLE,

    I need to do transformation for all the text files in a particular

    folder to the particular Database,

    Can any one tell me the options for doing this ?


    Regards,
    Anand

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    text file input step can use regular expressions for input files...

    or you can use "get file nanes" step and attach a hop from that to a text input step, csv input step, or fixed file input step.

    There are more combinations possible, but these are the most obvious.

    Regards,
    Sven

  3. #3
    Join Date
    Jul 2008
    Posts
    10

    Default

    Thanks,

    But actually what i need is to

    Transform the content (table columns) of the all Text

    Files in a folder to Particular table in the Database,

    and I need not store the Text Files Names in the Database,

    If i just specify the folder name ,

    Each Text file (Content contains the data to be pushed to database) in the Folder needs to Transformed to one by one

    Regards,
    Anand

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    Which is also what I meant

    Regards,
    Sven

  5. #5
    Join Date
    Feb 2008
    Posts
    216

    Default How is the regular expression used in conjunction with text file input

    Quote Originally Posted by sboden View Post
    Which is also what I meant

    Regards,
    Sven
    or with the get file names step?

    I would like to determine the year based on part of the file naming of a set of files. It seems for both of these steps you have to specify an actual file name, rather than a directory, in order to retrieve the files. Or am I just specifying this wrong? Even though the field states "File or directory" it doesn't seem to allow you to select just a directory unless you remove the file after the fact. Can you post an example of using the regular expression on a set of files in a directory?

  6. #6
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    If you put something in the Regex box before you click browse, it will let you select only a directory.

    eg.
    2009.*csv in the regex box, then click browse, and you can select the directory where you have files that would match the DOS (or Unix) wildcard 2009*csv
    Last edited by gutlez; 01-23-2009 at 09:04 PM.

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.