Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
I have installed the dss-plugin-sharepoint-server Plugin, and I want to access it through Python to dynamically create folders inside the sharepoint?
How to access the plugin from Python?
Thanks.
Hi @zeno_11 !
You need first to create a managed folder in your project, which points to SharePoint folder in which your python code will create folders.
Note: It is highly recommended that this folder is only used by DSS : any "drop data" operation will result in deleting the folder on the SharePoint side.
To create the managed folder, use DSS Project > +Dataset > Folder > Store into plugin sharepoint-online Shared Document. At first there will be an error. Go to Settings and set the proper auth type and preset. Then browse to reach the target (empty) Sharepoint folder.
Next, you can create a python recipe which uses this folder as an output. In your code, you can use dataiku.Folder and get_writer, as described here to create the files and the folders present in their paths.
I hope this helps
Alex
Hi @zeno_11 !
You need first to create a managed folder in your project, which points to SharePoint folder in which your python code will create folders.
Note: It is highly recommended that this folder is only used by DSS : any "drop data" operation will result in deleting the folder on the SharePoint side.
To create the managed folder, use DSS Project > +Dataset > Folder > Store into plugin sharepoint-online Shared Document. At first there will be an error. Go to Settings and set the proper auth type and preset. Then browse to reach the target (empty) Sharepoint folder.
Next, you can create a python recipe which uses this folder as an output. In your code, you can use dataiku.Folder and get_writer, as described here to create the files and the folders present in their paths.
I hope this helps
Alex
Thanks, I was able to write dynamically to the folder (and create subfolders) using the get_writer method.