Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
QlikWorld May 10-12, Online and Free! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load JSON data in Qlik Sense

Assuming I have an external source which has an REST/SOAP API returning JSON data, Is it possible to read a REST or SOAP API  and load JSON data into Qlik?

4 Replies
konrad_mattheis
Luminary Alumni
Luminary Alumni

Yes, this is possible.

Just use the Qlik REST Connector.

bye Konrad

hoangvvo
Partner
Partner

You can do a select on the json string to create a data model.

ex:jsonstring= [{"key1":"value1"},{"key2":"value2"}]

Tmp:

Load Id,Name,Address;

SQL Select Id,

     Name=JSON_VALUE(JSonStringColumn,'$.key1'),

     Address=JSON_VALUE(JsonStringColumn,'$.key2')

from your table

This will then create a table with Name and Address as the two column..

I think this is what you meant.

TKendrick20
Partner
Partner

This is very helpful. Do you have any idea what the performance implications of this strategy would be? Also, would there be a way to load the column names dynamically based on the Key in the JSON?

Thanks!

hoangvvo
Partner
Partner

Performance should be based on the sql server as you are passing the query to the database and the database itself is doing the work. for Json_Value function, I think you need to know the name of the column as it goes by the path($.Key) however if your database is not an azure and has an object OpenJson you can use that, it can be call dynamically (like select * from table) here's the info for both: OpenJSON - https://msdn.microsoft.com/en-us/library/dn921885.aspx JSON_Value - https://msdn.microsoft.com/en-us/library/dn921898.aspx