1 Reply Latest reply: Oct 23, 2017 8:55 AM by Sandeep Roy RSS

    How to load REST API key/value data?

    jillian jarrett

      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