Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today

JSON Loader

Luminary
Luminary

JSON Loader

Hey,

I hope I can solve a lot of peoples headache with a better way of loading JSON data.

This method works by loading the JSON data into an table with a single field, and then placing it into a variable and then converting the value into xml which then is loaded. Works very well but is still a bit for the technical people. I will not provide any support.

In order to make this work, we need to detect the XML definition after JSON to XML conversion. Open the JSON Loader.qvw Application and the JSON url.

Copy the JSON output into the vData variable, and click the JSON to XML button. Now take the output in the left side and copy that into a .xml file and load it from qlikview.

The output script should look similar to this:

TAG:

LOAD adminCode3,

    adminName2

FROM [Desktop\xml.xml] (XmlSimple, Table is [XML/POSTALCODES/TAG]);

From this we need to extract 2 things. The list of fields (place into vFields), and the XML tree to load (place into vXMLTree).

In the edit script set the variables based on the above:

Let vUrl = 'http://api.geonames.org/postalCodeLookupJSON?postalcode=6600&country=AT&username=demo';

Let vFields = 'adminCode3,adminName2';

Let vXMLTree = 'XML/POSTALCODES/TAG';

Cross fingers and reload

Do this for each JSON source.

Enjoy Torben Seebach 4C Management Consulting

Tags (2)
Labels (1)
Attachments
Comments
Contributor
Contributor

Hello Everyone,

I have issue in loading JSON file Without publishing in Qlik.Please help me as am new to qlik.

Thank you in advance.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2012-06-20 03:04 PM
Updated by: