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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Karuetl
Creator II
Creator II

tExtractJSON -java.lang.RuntimeException: no Getter for field scale in class java.math.BigDecimal

I am reading XML data and using the component tExtractJSON as below, one of the fields has data with float values

 

{"ID":1,"Rate":0.01,"Generated":true}

 

0683p000009M4HE.png

 

The job fails with below error 

java.lang.RuntimeException: no Getter for field scale in class java.math.BigDecimal
Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi @Karuetl ,

 

There are many records in your json have a large bigdecimal value and below are those records from your input file.

"Rate":0.0031399999279528856
"Rate":0.004999999888241291
"Rate":0.0070000002160668373
"Rate":0.0074999998323619366
"Rate":0.010999999940395355
"Rate":0.012500000186264515
"Rate":0.014999999664723873
"Rate":0.017999999225139618
"Rate":0.0215000007301569
"Rate":0.02370000071823597
"Rate":0.02500000037252903
"Rate":0.046999998390674591
"Rate":0.05000000074505806
"Rate":0.052200000733137131
"Rate":0.0560000017285347
"Rate":0.057199999690055847
"Rate":0.059999998658895493
"Rate":0.064999997615814209
"Rate":0.068000003695487976
"Rate":0.070000000298023224
"Rate":0.079999998211860657
"Rate":0.0949999988079071
"Rate":0.11299999803304672

The solution to your issue is, you need to keep the value of the Rate key value in double quotes in all objects of your json. I can extract 25957 records from the given input sample file.

0683p000009M50i.png0683p000009M55m.png0683p000009M55r.png0683p000009M561.png

 

--

Please give Kudos and mark topics as solved where appropriate.

View solution in original post

10 Replies
nfz11
Creator III
Creator III

Please show the details of your tExtractJSONFields component as well as the schema.

Karuetl
Creator II
Creator II
Author

 

I tried both string and float and bigdecimal for rate column 

 

0683p000009M4Hi.png

nfz11
Creator III
Creator III

You could try quoting the values in your JSON, that would certainly work.

 

Can you put a tLogRow right before your tExtractJSONFields to see exactly what the data looks like?

bhagyarekha
Creator II
Creator II

hi

Here my doubt is if your reading xml data why to to textractjson fields,as per my knowledge you should use tExtractXMLField.

Regards

rekha

Karuetl
Creator II
Creator II
Author

The data in the XML file are in key value format

Karuetl
Creator II
Creator II
Author

Do you mean value in the enclosed with double quotes ? if that's the case I dont guess we can as we get xml file from API 

Anonymous
Not applicable

I can able to extract the columns even it is a bigdecimal. For example i took sample data with fixedflow and passed it through extractjson. I am getting output with bigdecimal/string as its datatype.0683p000009M4La.png0683p000009M4LW.png0683p000009M48D.png0683p000009M4FA.png

Karuetl
Creator II
Creator II
Author

i tried its not working for me

Anonymous
Not applicable

Hi @Karuetl,

 

The error you are getting is known issue and you can find in many tickets and the main ticket is here https://jira.talendforge.org/browse/TDI-35990?_ga=2.26270973.1977352456.1558436214-260665681.1558065...

 

There are many records in your json have a large bigdecimal value and below are those records from your input file. 

"Rate":0.0031399999279528856
"Rate":0.004999999888241291
"Rate":0.0070000002160668373
"Rate":0.0074999998323619366
"Rate":0.010999999940395355
"Rate":0.012500000186264515
"Rate":0.014999999664723873
"Rate":0.017999999225139618
"Rate":0.0215000007301569
"Rate":0.02370000071823597
"Rate":0.02500000037252903
"Rate":0.046999998390674591
"Rate":0.05000000074505806
"Rate":0.052200000733137131
"Rate":0.0560000017285347
"Rate":0.057199999690055847
"Rate":0.059999998658895493
"Rate":0.064999997615814209
"Rate":0.068000003695487976
"Rate":0.070000000298023224
"Rate":0.079999998211860657
"Rate":0.0949999988079071
"Rate":0.11299999803304672

The solution to your issue is, you need to keep the value of the Rate key value in double quotes in all objects of your json.

 

0683p000009M55X.png0683p000009M4td.png0683p000009M55c.png0683p000009M55h.png

-- 

Please give Kudos and mark topics as solved where appropriate.