Plugin output to Managed Folder

Jonathan
Level 1
Plugin output to Managed Folder

Hi,



I am writing a Dataiku Python plugin and am wondering whether it is possible to have a "Managed Folder" as an output.



I can have DataSets as managed outputs using:



# Write the output to the output dataset

main_output_name = get_output_names_for_role('main')[0]

output_dataset =  dataiku.Dataset(main_output_name)

output_dataset.write_with_schema(pd.DataFrame(output))



Is there a similar way of outputting to a Managed Folder, e.g. dataiku.Folder(main_output_name)?



Any help is much appreciated.



Thanks,



Jonathan



 

0 Kudos
1 Reply
fchataigner2
Dataiker
Hi,

you can indeed get a handle on the folder with : f = dataiku.Folder(main_output_name)

The actual folder location on disk is then : f.get_path()

Remember to add '"acceptsManagedFolder" : true' in the recipe.json file of the plugin so that you can actually put folders as output. By default the json only contains '"acceptsDataset" : true'

Regards
0 Kudos

Labels

?
Labels (4)
A banner prompting to get Dataiku