Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: How to set up the regular expressions in the Excel Input?

  1. #1

    Default How to set up the regular expressions in the Excel Input?

    Hi All,

    I wanted to add around 60 excel files in a folder into Kettle. The files path are
    C:\Documents and Settings\Samuel Wu\Desktop\test\test_0.xls

    where 0 can be any numbers like 0, 1, 2, ..., 10, 12, 19,99 not larger than 99.

    those 60 files have the same sheet name and the same fields.

    I thought using such a reg exp to add all those files once into kettle:
    C:\\Documents and Settings\\Samuel Wu\\Desktop\\test\\test_[0-9]+\.xls$

    I tried this in ultraedit (I'm not familiar with reg exp). It seemed it worked well. But I failed in Kettle. Kettle reported it couldn't find any file or directory.

    Thanks very much for your helps in advance.

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

    Default

    Did you separate path and wildcard?

    Regards,
    Sven

  3. #3

    Default

    Sven,
    Sorry, not very well understood about how to separate them. I thought the whole path (including the filenames) was a string, so I tested it in Ultraedit sucessfully.

    expect you can make it clearer or just give me an example. Thanks very much.

    I've finished adding 60 files manually. it was a huge task, really.

    Quote Originally Posted by sboden View Post
    Did you separate path and wildcard?

    Regards,
    Sven

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

    Default

    On the first tab of the excel input you have a textbox for the path, and a text box for the wildcard. Put the path in the first and the wildcard for the file in the second. Then add them, the result should be that path and wildcard are in different columns in the table lower in the tab.

    Regards,
    Sven

  5. #5

    Default

    Thanks very much, Sven. I got it solved with directory and filename separated.

    Thanks.

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 - 2017 Pentaho Corporation. All Rights Reserved.