Qlik Community

Qlik Sense Data Connectivity

Discussion board where members can learn more about Qlik Sense Data Connectivity.

teamxanalytics
New Contributor II

How to load REST API key/value data?

Hi,

I'm trying to get data from an API to load in QlikSense (using a REST connector).

The data comes from an OpenTSDB web service and looks like this:

[

  {

    "metric": "metric1",

    "dps": {

      "1503217340": 1

      "1503217345": 1

      "1503217350": 1

    }

  },

  {

    "metric": "metric2",

    "dps": {

      "1503217350": 1

      "1503217355": 1

      "1503217350": 1

    }

]

How do I load the data such that the content of "dps" is loaded as a table?

All the Qlik examples assume the JSON data uses fixed attribute names.

I have no idea how to refer to the dps's key/values.

I was able to get this far:

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

    --

    -- How to access the key/value here?

    --

"__FK_dps"

FROM "dps" FK "__FK_dps")

FROM JSON (wrap on) "root" PK "__KEY_root";

Can someone please help me finish this statement?

Thanks,

Jill

Tags (1)
1 Reply
sandeep_roy
Contributor

Re: How to load REST API key/value data?

Can you try to convert first into XML?

Community Browser