For one Talend job, I use the tJava component to replace the name of the current file
String currentFileName = ((String)globalMap.get("tFileList_1_CURRENT_FILE"));
String newCurrentFileName = null;
String pattern = ((String)globalMap.get("Stichtag"));
String replacement = "20181010";
newCurrentFileName = currentFileName.replaceAll(pattern, replacement);
But if I’ll execute this Job I get an exception:
Exception in component tJava_3
Do you have any ideas, what is wrong?
Thanks in advance
Solved! Go to Solution.
In first step, you are using tFileList_1_CURRENT_FILE but in later step you are using tFileList_5_CURRENT_FILE.
Could you please print and see the value in the variables to make sure that it is havign right values?
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Find out about Talend's 2019 Summer release
Talend continues to revolutionize how businesses leverage speed and manage scale
Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend