How to load a file from a managed folder in an endpoint defined with API Designer ?
Hello,
I defined an end point with a working folder (managed folder).
In my python function (API), I would like to read a file from this managed folder.
Please, how to proceed to read it with good performances ?
Thanks
Annie
Best Answer
-
Hi,
In the API, I would like to use the 'get_file' method of the Managed folder and I need to provide a 'path'. How can I get the path of the managed folder ?
This refers to the API at this URL https://doc.dataiku.com/dss/latest/python-api/managed_folders.html
Thanks
Annie
Answers
-
Hi,
the doc for this usage is https://doc.dataiku.com/dss/latest/apinode/endpoint-python-function.html#using-managed-folders
DSS will have the folder's content copied to the local filesystem of where the API service runs, and you code can access it there
-
Tsen-Hung Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 5 ✭✭✭✭
I had the exact same problem here that the model was trained outside of the DSS ecosystem and serialized in a pickle file.
I was confused between setting a remote DSS client to retrieve the folder path and directly bringing the folder under an endpoint's settings tab, then directly read the folder content in a python endpoint.
@fchataigner2
thanks for the suggestion!