Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The job design is as below, which would be running in batch mode as .sh:
1. Read the connection parameters, assign to globalMap.
2. Read the application parameters, assign to globalMap.
3. Check if the restart file exist. If exist get the last processed ID and assign to globalMap.
4. On successful assigning last processed ID to globalMap, delete the file.
5. Read data from tables, process and update the table.
6. On unsuccessful exit on table update, create the file and save the last processed ID.
All the component works except tFileExist. It is not working as expected.
The file name is from globalMap variable - ((String)globalMap.get("filepath/filename"))
And this component is connected to tFileInputDelimited onSubjobOk.
The expectation is such that tFileInputDelimited should run only when file exist.
But actual scenario is that tFileInputDelimited run even when the file does not exist.
The tJava displays the filepath/filename as expected.
I have attached the screenshot.
Could you suggest how could I use the tFileExist with the file name from globalMap variable.
Thanks.
In the if condition put :
((Boolean)globalMap.get("tFileExist_1_EXISTS"))==true
If you want to continue if file exist
or
((Boolean)globalMap.get("tFileExist_1_EXISTS"))==false
I get "java.io.FileNotFoundException:" when the tFileInputDelimited_3 file does not exist.
This tFileInputDelimited_3 is invoked OnSubjobOk from tFileExist_1.
In the if condition put :
((Boolean)globalMap.get("tFileExist_1_EXISTS"))==true
If you want to continue if file exist
or
((Boolean)globalMap.get("tFileExist_1_EXISTS"))==false