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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tExtractJsonFields error on json field extraction

Hi , I have a job as shown below

0683p000009LxCl.png

The XML format is as follows

 

|200 |<?xml version="1.0" encoding="UTF-8"?>
<root><status>1</status><data>110.0</data></root>|null |

 

And the textractjsonfield configuration is as shown below. I want to capture the value of the <data> thats coming out of txmlmap

 

0683p000009Lx56.png

 

When I run the job I get this error

0683p000009Lx5Q.png

Any ideas on this?

Labels (4)
5 Replies
David_Beaty
Specialist
Specialist

Hi,

 

Have you clicked on the "Code" tab in the bottom of the job design, next to "Designer" - look for the red section on the right had of the generated Java.

 

Thanks

 

David

Anonymous
Not applicable
Author

Hi David,

 

The red ones on the code are

 

XML_API_tXMLMap_1_TXMLMAP_OUT xml_api_tXMLMap_1_TXMLMAP_OUT = new XML_API_tXMLMap_1_TXMLMAP_OUT();

 


out3_tmp.data = treeNodeAPI_tXMLMap_1_TXMLMAP_OUT.get_String("row2.body:/root/data") treeNodeAPI_tXMLMap_1_TXMLMAP_OUT.get_String("row2.body:/root/data");


out3_tmp.status = treeNodeAPI_tXMLMap_1_TXMLMAP_OUT.get_String("row2.body:/root/status") treeNodeAPI_tXMLMap_1_TXMLMAP_OUT.get_String("row2.body:/root/status");allOutsForAggregate_tXMLMap_1.add(out3_tmp);

 

Can't get what's wrong here

vboppudi
Partner - Creator III
Partner - Creator III

Hi,

 

Are you looking for the following output?

0683p000009LwiI.png0683p000009LxF0.png

Regards,

Anonymous
Not applicable
Author

Yes Veeru I am expecting this output

 

However, the output of my response is this way

 

200||<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ResponseStatus><data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:decimal">110.00</data><status>1</status></ResponseStatus>

 

Can you please let me know how do I extract the value 110.00 from here?

 

Thanks

 

vboppudi
Partner - Creator III
Partner - Creator III

Please try below

0683p000009LxJ2.png0683p000009LxH2.png

Regards,