YOo Slim
YOo Slim

Reputation: 54

Talend - Check if list of directories exist

So i have a metadatas excel file that contains a list of directories. How can check if every directory exist ? If directory doesn't exist, we add a warning message to a log file.

I tried to combine tExcelInput, tFileList and tFileExist, but i can't make it work.

Thank you.

Upvotes: 0

Views: 3559

Answers (1)

RenjuMathews
RenjuMathews

Reputation: 41

YOo Slim,

You can use tFileExist to check for the presence of directories. Just paste the full directory name in the File name/Stream and use OnComponentOk and OnComponentError from the tFileExist to perform any action.

Notes :-

  1. Tested on Windows, haven't tested on Linux

  2. If you use the ... button near the File name/Stream, you will have to select a file. Instead just paste the folder path in the box

  3. The OnComponentOk and OnComponentError wont give you a lot of options when you drag it. However if you create a subjob and then try to connect using these options, it should allow you. For me OnComponentOk points to a tJava and OnComponentError points to a subjob with a tRowGenerator connected to a tLogRow. (describing coz i can't upload an image)

-Renju MAthews

Upvotes: 3

Related Questions