Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Kaliana
Contributor III
Contributor III

Insert Data

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

0683p000009M82l.png0683p000009M7zW.png

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
Sujay1
Creator
Creator

@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 0683p000009MACn.png . 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. 

View solution in original post

5 Replies
Sujay1
Creator
Creator

@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.

Kaliana
Contributor III
Contributor III
Author

Hello,

The data type of the field in DB : Number(20,2)

And it is in the tmap5 that the error occurs.

0683p000009M7zl.png0683p000009M830.png

Sujay1
Creator
Creator

@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 0683p000009MACn.png . 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
Contributor III
Contributor III
Author

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

Sujay1
Creator
Creator

@Kaliana cool as long as its solved. cheers 0683p000009MACn.png