Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can you please help me resolve this error.
I am not seeing a boolean data type but I am getting this error message...
Error Line: 3835
Detail Message: Type mismatch: cannot convert from boolean to String
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.
Hi,
Can you share your Talend job design.
I've experienced similar when you use the shorthand java if/then/else, you need to cast the result to a string:
{condition}?
"value if true"
:
"value if false"
Try:
(String)({condition}?
"value if true"
:
"value if false")
Thanks
David
Ok, You might be on point with this. I think I will edit as you suggested then reply later on if I still need help.. Thanks!
Hello!
I think this error is coming from this line of codes:
row1.Post_Key().equals("debit")? "60" : "70"
I received error above cannot convert from boolean to string so I cast to a string like this, below. It is still not working. I am getting error as stated above.
((String) row1).Post_Key().equals("debit")? "60" : "70"
Hi,
Assuming Post_Key is a column on row1, then you should use something like:
(String)("debit".equals(row1.Post_Key)?"60" : "70")
Checking the column is equal to the literal value is null safe.
Thanks
David
Ok, Thanks David I will try this.
Connect your components first !!!! You will always have errors if you don’t connect components Edi !!
Cause the boolean error is because the input is not connected
I have it connected back before I run it. I just displaying all the palettes I am using. The error is somewhere in the tMap code. All the other tfiles are good.