Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Multiple & Dynamic File Loading

  1. #1
    Join Date
    Jun 2007
    Posts
    138

    Default Multiple & Dynamic File Loading

    Hi....

    My all problmes would be running around Dynamicity...
    & Many times I am being adviced to use some other tool rather then Kettle.(like Pentaho Reporting,etc) .

    Our limitation is,after lots of effort,we ve convinced our client to use Kettle.So now,we cant use anything else!!But any how,form this forum only,I have got the soutions...One more problem is..

    Problem,Case:

    We have JSF (java) interface.Through which User will select any number of files Available.The number is dynamic.Though I ll get all the files selected with thier name s & path.Again they are coming dynamically.

    We are passing information from JAVA to Kettle using HashMap.Which can be received by component "Get Variable".Mind ,it is hash map.

    Now,I want to process each file,user selcted.Is it possible to execute all the files in single call to kettle(i.e. single trasnformation)??

    Or I ll have to use individual call/Transformation for each file?

    Please guide me...
    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

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

    Default

    Depends how far you want to drive it.

    Get variables changes in v3 so you will have to do changes anyway.

    Problem is how you pass the data from your application to Kettle. If you're realling programming in java and embedding Kettle I would try to use injector step connected to a text input file step which takes the names of the files from what you inject into the transformation.

    Other ways are possible. You could use variables and run in your application a transformation x times with different variable values, ...

    Regards,
    Sven

  3. #3
    Join Date
    Jun 2007
    Posts
    138

    Default reading all files/Filenames in a folder

    Hi,Sven..

    The same query is posted into thread,

    http://forums.pentaho.org/showthread...692#post169692

    So,Plz Reply only 1...

    I m trying to laod all files listed in the same directory.....

    My Dir is, D:\kedar\discount\
    I want all Txt file: *.txt

    I am using "D:\kedar\discount\*.txt"

    I tried to give the same string into ,
    File Name Tab
    Regex Tab...

    N combined in both tab(like Path & Wild card)...


    But it is not able to find any such file.Wat shd be done...?
    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

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

    Default

    directory in 1 column, .*\.txt in the filename column.... it is ".*\.txt" and not "*.txt"... they're regular expressions.

    Regards,
    Sven

  5. #5
    Join Date
    Jun 2007
    Posts
    138

    Default Working

    Its working Sven...

    Thanx..
    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

  6. #6
    Join Date
    Jun 2007
    Posts
    138

    Default load all the files in the folder & process each as per their name

    the same query has been posted @
    http://forums.pentaho.org/showthread...846#post177846

    So reply only 1...

    I got few files in a folder.Numbers of file is not certain.I want to load all the files in that folder & process each separately,as per their names.

    Can I do it with kettle 2.5?How!!?

    I can load all the files by giving input file name as .*txt (regex) & now as per their names,I want to apply filtering..But how can I do it,when the number of files is not fix...
    Yes cases are fix..Like filtering cretira ,is fix.

    Thanx in ad...
    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

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.