Check out the first Dataiku 8 Deep Dive focusing on Productivity on October 29th Read More

API to create a directory under a managed folder not local

Level 3
Level 3
API to create a directory under a managed folder not local

Hi again, 

  I've a managed folder under HDFS and want to create a subfolder under it but cannot find under the

  API documentation the method or the function to do it. How can this be done ? It should be possible

  because from the UI that is possible...

Thanks. Regards.

  Giuseppe 

0 Kudos
1 Reply
Dataiker
Dataiker

since the notion of folder does not exist for all connection types that you can put managed folders on (as in: it doesn't exist for cloud storages), the is no API to directly create directories inside managed folders. The directories are automatically created as needed when you write a file. For example calling https://doc.dataiku.com/dss/latest/python-api/managed_folders.html#dataiku.Folder.upload_data with `upload_data("/subdir1/subdir2/stuff", [])` will create the sub-directories subdir1 and subdir2 if they don't exist. You could write empty files to force directories to be created.