Announcing the winners & finalists of the Dataiku Frontrunner Awards 2021! Read their inspiring stories

is there any way to create managed folder by using the python recipe?

Solved!
manhnam91
Level 2
Level 2
is there any way to create managed folder by using the python recipe?

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

0 Kudos
1 Solution
MarcH
Dataiker
Dataiker

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...

View solution in original post

0 Kudos
2 Replies
MarcH
Dataiker
Dataiker

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...

View solution in original post

0 Kudos
manhnam91
Level 2
Level 2
Author

it worked! thank you very much 😍

0 Kudos
A banner prompting to get Dataiku DSS