Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (3)
2 Replies
Anonymous
Not applicable
Author

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

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