Do you know the History of Data Science? READ MORE

How to load a file from a managed folder in an endpoint defined with API Designer ?

Solved!
rona
Level 3
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

0 Kudos
1 Solution
rona
Level 3
Author

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

View solution in original post

0 Kudos
3 Replies
fchataigner2
Dataiker
Dataiker

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

rona
Level 3
Author

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

View solution in original post

0 Kudos
Tsen-Hung
Level 1

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!

A banner prompting to get Dataiku DSS