Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to check for NULL & Empty string and convert it to BigDecimal

Hello all,

I am trying to check NULL or empty string and converting into BigDecimal, my target attribute is also BigDecimal (21,10).

I have below expression in my tMap in my talend job. But i am seeing below error when i execute the job.

 

 

new BigDecimal((row1.DL_GRP_LLIAB_SPLS_RT==null || row1.DL_GRP_LLIAB_SPLS_RT.isEmpty())?0:row1.DL_GRP_LLIAB_SPLS_RT) 

compilation error:

0683p000009MaC6.png

tMap Code:

0683p000009MZzI.png

 

Labels (2)
1 Reply
manodwhb
Champion II
Champion II

@Ariean , check the below one. and the input data type is string.

(row1.DL_GRP_LLIAB_SPLS_RT==null || row1.DL_GRP_LLIAB_SPLS_RT.isEmpty())?new BigDecimal(0):new BigDecimal(row1.DL_GRP_LLIAB_SPLS_RT)