Search code examples
pentahokettle

Pentaho Spoon - Wait for File - Wildcards


I know i've asked a couple of pentaho related questions lately but am rushing to evaluate it in a short timeframe :)

My latest obstacle I am trying to overcome is that I am building a job that will process an input file when it arrives, but i only know the format for the filename, not the exact filename itself and the "wait for file" step does not allow wildcards. This seems like a glaring ommision for such a step so am wondering if i've just missed something but on forums etc it seems i'm not the only one facing such a challenge.

Ideally i need the "wait for file" step to search on a wildcard/regex and when it finds a match pass the resulting files name to the next step in the job for processing.

Any suggestions?

Thanks

Tom


Solution

  • Again I try to answer your question.

    Actually, you don't need a job to wait for a file. Based on my answer on country split : Pentaho Spoon - Output to multiple files based on field content, you just need to pass through the source name and then archive it using process file (see the pic below). Text Input Dialog

    From here, I think you can adapting my logic using the ktr I provided before (http://pentaho.phi-integration.com/kettle/kettle-files/split_countries.ktr).

    Then you can control the repetition of the job (wait and process files) using job scheduler (see the pic). enter image description here

    Well, hope this helps Tom !

    Regards,

    Dino