6 Replies Latest reply: Jul 11, 2018 10:22 AM by Suzan Wijnans RSS

    Can Qlik Sense read .JSON files?

    Amien Amien

      I know there is a REST Connector. But i need to enter a URL there. With HTTP or HTTPS protocol. Is it possible to link to a JSON folder or file?

       

      Thanks in advanced

        • Re: Can Qlik Sense read .JSON files?
          Simon Hogg

          Yes, absolutely it can (having just done it) but depending on your data structure it might be best not to as it can still involve a lot of editing.

           

          If your JSON data is in a file you should be able to just load it as any other flat table (csv, etc.) but you might have to split it out into sub-tables by hand.

           

          Worst case is probably having to load the JSON into something like MongoDB then load into Qlik from there (that's where I started!!!)

          • Re: Can Qlik Sense read .JSON files?
            Steven Koppens

            If you want a easy scripting solution, you could use Python to convert to CSV:

             

            import pandas

            df = pandas.read_json("example.json")

            df.to_csv('example.csv')

            • Re: Can Qlik Sense read .JSON files?
              Suzan Wijnans

              You can read json files directly from a file directory.

              In QlikView this option was available from table load. In Sense it dissapeared.

              The script still works though ;-)

              Here's an example

               

              YSIS_BarthelScore:

                  LOAD

                  PatientID

                    , Barthelscore

                    , Datum_van_afname

                    , MomentAfname

                  from [lib://YSIS/barthelscore.json] (json, codepage is 1252, embedded labels);

               

              • If you dont know the column names first perform a select*
              • Create a library/connection to your directory