Plugin output to Managed Folder
Jonathan
Registered Posts: 2 ✭✭✭✭
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
Tagged:
Answers
-
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