is there any way to create managed folder by using the python recipe?
![manhnam91](https://us.v-cdn.net/6038231/uploads/lithium_attachments/n5030iBF33299B9C60D34E.jpg)
I know we can use a managed folder in the python recipe by using python API, but I don't know how to create a new managed folder by python. in my case, I'm using Azure block storage as the connection for my managed folders, and I need to automatically create new managed folders when running the flow, for some business use-cases. Is there any way I can do this? many thanks
Best Answers
-
Hello,
Yes, you can use the Python API to create a managed folder. From inside a Python recipe, you can do something like the following:
api_client = dataiku.api_client() project = api_client.get_project("project key") new_folder = project.create_managed_folder("managed folder name")
new_folder will be a handle to your newly created managed folder.
See here for more information about the create_managed_folder method: https://doc.dataiku.com/dss/latest/python-api/projects.html#dataikuapi.dss.project.DSSProject.create_managed_folder
-
manhnam91 Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 11 Partner
it worked! thank you very much