[resolved] syntax error on token "(" exp expected: if statment seems to be wrong
Dear Team,
We have created an ETL with Talend (Version 5.0). We import some data with the ETL from flat file to Oracle database (11g).
The generated java code seems to be wrong.
The error message as follows:
syntax error
on
token
"(",
expression expected Talend marks an "if" statement as erronous (please find the statement at the final part of the code):
I am not a java expert but it seems that this if close does not contains any condition:
if () {
tOracleRow_1Process(globalMap); } Do you have any idea how to get read of the error or solve the problem. Shell we build the whole ETL again.
Any help/suggestion is appreciated.
Thank you for your support!
Best Regards,
Robert
Please find the method below:
Method:
public void tFileList_1Process(final java.util.Map<String, Object> globalMap) throws TalendException {
globalMap.put("tFileList_1_SUBPROCESS_STATE", 0);
final boolean execStat = this.execStat;
String iterateId = "";
String currentComponent = "";
if (!case_sensitive_tFileList_1){
fileNamePattern_tFileList_1 = java.util.regex.Pattern.compile(filemask_tFileList_1, java.util.regex.Pattern.CASE_INSENSITIVE);
}
java.io.File file_tFileList_1 = new java.io.File(directory_tFileList_1);
final java.util.List<java.io.File> list_tFileList_1 = new java.util.ArrayList<java.io.File>();
It looks like an if trigger without an expression. Select the if trigger connection and take care you set an expression which returns a boolean like row1.value == 1 or row5.name.equals("Max")
It looks like an if trigger without an expression. Select the if trigger connection and take care you set an expression which returns a boolean like row1.value == 1 or row5.name.equals("Max")
Dear Jlolling,
indeed, after I extanded the if statment with a condition the ETL ran successfully. Issue solved!
Thank you! Have a nice weekend!
Best Regards,
Robert