Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Can you help me please? I get the following error when trying to insert calculated data into a field. Thank you for your help
@Kalianafrom ur screenshot it clearly shows error is at "STR_CONSO_TRANSPORT"(ORACLE OUTPUT as ) as any component which has error is shown at top of the component in talendOS . Can you change the datatype to double in Database as your using double in the tmap and try it out once. If you still think it's DB error to clarify redirect the output to tlogrow to see. My gut feeling says it will log the data properly.
@Kaliana the ternary operator worked fine I used the same one maybe it has something todo with the output step. Did you checked the datatype of the field in DB. Can you post full error message and job pic.
Hello,
The data type of the field in DB : Number(20,2)
And it is in the tmap5 that the error occurs.
@Kalianafrom ur screenshot it clearly shows error is at "STR_CONSO_TRANSPORT"(ORACLE OUTPUT as ) as any component which has error is shown at top of the component in talendOS . Can you change the datatype to double in Database as your using double in the tmap and try it out once. If you still think it's DB error to clarify redirect the output to tlogrow to see. My gut feeling says it will log the data properly.
Hello, Thank you for your return.
In fact, I already modified the fields in tmap. And I changed the type of NUMBER fields (20,2) to (38,2). The problem came from the fact that there were data to compute in forms 0/0 or 0 / null which caused errors of the NaN or Infinity type (in the tlogRow).
So to solve the problem:
1- I created another job that was updating the null values:
"UPDATE STR_CONSO_TRANSPORT SET CONSO_COST_BASE = 0 WHERE CONSO_COST_BASE IS NULL"
2- I added the following conditions in the tmap :
row22.CONSO_TONNAGE == 0 || row22.CONSO_COST_BASE == 0?:
row22.CONSO_TYPE.equals ( "x")?(row22.CONSO_COST_BASE / row22.CONSO_TONNAGE): 0
@Kaliana cool as long as its solved. cheers