About tfileexists and tfilelist

Highlighted
One Star

About tfileexists and tfilelist

Hello, I want to check files from a directory and I need to check that these files have a certain name (always the same, sales_date, soc_date, etc...) concatenated with the actual date. I need to check this and only if all files are in the directory then launch a job that makes the ETL process. If some file or files doesn't exists, the ETL wouldn't be launched.
I'm trying to make a test job with tfilelist ---iterate--> tfileexists -----> if (Boolean)globalMap.get("tFileExists_EXISTS") --> tmessagebox (success, file found)
|
if !(Boolean)globalMap.get("tFileExists_EXISTS")
|
v
tmessagebox (error, file not found)
with the tfileexists filename field with ((String)globalMap.get("tFileList_1_CURRENT_FILE"))
Now I have in tfilelist one directory to search and one filename with "file.txt" and the job gives me an error in tfileexists
connecting to socket on port 4009
Exception in component tFileExist_1
java.lang.NullPointerException
at aquagest.prueba_0_1.prueba.tFileList_1Process(prueba.java:417)
at aquagest.prueba_0_1.prueba.runJobInTOS(prueba.java:818)
at aquagest.prueba_0_1.prueba.main(prueba.java:692)
connected
disconnected
Please, ¿what am I doing wrong? Thanks.
Employee

Re: About tfileexists and tfilelist

Hi Sbiky,
Your job design seems good, could you do a screenshot of the tFile exists properties and of the tFileList properties?
Seven Stars

Re: About tfileexists and tfilelist

You RunIf conditions are incorrect: they should be something like (Boolean)globalMap.get("tFileExist_1_EXISTS")