Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
Just downloaded Talend Big data community version into my laptop and trying to do even and odd number printing to tlogrow.
The job is as below
In trowgenerator, created a column sq_id as integer with function numeric.sequence
in tmap, I am trying to use the mod function to get divisable as 1 or 0 to identify it as even or odd....the image is as below
I am getting error saying , type mismatch, cannot convert from boolean to integer
can someone help me here how to handle this?
Thanks
SV
You are writing expression in the value field of tMap.
Mathematical.MOD() == 1 will return true or false which is a Boolean value and you are trying to assign it on seq_id which is a integer.
You have to write this MOD() function in the filter condition on tMap on the top of output.
Hi
Can you paste the expression in the post?
Regards
Shong
You are writing expression in the value field of tMap.
Mathematical.MOD() == 1 will return true or false which is a Boolean value and you are trying to assign it on seq_id which is a integer.
You have to write this MOD() function in the filter condition on tMap on the top of output.
Hi @Shicong Hong ...I am able to fix this by assign the expression to a variable and it worked.
here is the expression: row1.sq_id%2==0?row1.sq_id+"-even":row1.sq_id+"-odd" ....thanks for your help.
HI @prakhar dubey ....I will try your way also....I am able to fix this by assign the expression to a variable and it worked. here is the expression: row1.sq_id%2==0?row1.sq_id+"-even":row1.sq_id+"-odd" ....thanks for your help.
This incident is closed...thanks to all