Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team
In a directory i am having different files like txt files csv files and text files
is their any component in talend to find the count of files accornding to extension
or what is the procedure we need to follow to achieve the same through talend without using tFilelist component
Thanks
Deepthi
After tFilterRow component you can access to 2 global variables which give you the answer:
- ((Integer)globalMap.get("tFilterRow_11_NB_LINE_OK"))
- ((Integer)globalMap.get("tFilterRow_11_NB_LINE_REJECT"))
Try to connect a tJava component to tFileList using an OnSubJobOk trigger and print the content of "tFilterRow_11_NB_LINE_OK".
If the result is always 1 but you know it should be greater, add a tSetGlobalVar to replace your tLogRow_2 with the following content:
Key: OldFiles
Value: ((Integer)globalMap.getOrDefault("OldFiles", 0)) + 1
Then in the tJava component you just have added, replace "tFilterRow_11_NB_LINE_OK" by "OldFiles".
Let me know.