Read the contents of a json file into a json object from a managed folder in dataiku

ssuhas76
ssuhas76 Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 31
edited July 16 in Using Dataiku

I need to read contents of a jsonfile stored in a dataiku managed folder. Need the code for doing the same with dataikuapi package.

TypeError: the JSON object must be str, bytes or bytearray, not 'HTTPResponse'

import dataikuapi
client = dataikuapi.DSSClient(host, apiKey)
client._session.verify = False
project = client.get_project("xxxxxxxxxxxxx")
managedfolder = project.get_managed_folder("xxxxxxxxxxxxxxxxx")

import json
with managedfolder.get_file('xxxxxx.json') as fd:
    f = json.loads(fd.raw)

Answers

Setup Info
    Tags
      Help me…