Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Filename

  1. #1

    Default Filename

    Hi,
    I'd like to know if there is a solution to my problem...
    I will try to explain what I want to do :
    I have an input file in which I have names and I want to create output files which filenames will be the names I have in my input file... Is it possible?

    Thanks a lot.

    Anais.

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

    Default

    Kettle probably turing-complete so it can do anything, but it may take some time and workarounds

    If my assumption is correct that you have lines in your input file that contain for each line to which output file they should go:

    1) Make a transformation to get the unique list of filenames in the input file, throw this list to the result
    2) Make a subjob that runs once per input row
    3) in that subjob have a transformation that sets a variable to the current filename
    4) in the same subjob have a transformation that filters out the rows for that filename (I would use Javascript for the filtering, I doubt filter step supports variables there right now)

    and in the end you should get all specific rows to all right output files.

    If the above is not correct we will need some sample input data e.g.

    Regards,
    Sven

    P.S in the samples directory there's an example that processes e.g. a list of database tables... it's very similar.

  3. #3

    Default

    Thank you very much, I'll try this

  4. #4

    Default

    Hi, I've just got a little problem on this thing...
    My files are created but I don't know how to get my variable in JavaScript...

  5. #5

    Default

    Hey, it works with the filter row. I get the variable and then use the filter row and it's OK.

    Thank's very much

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.