Join us at the Everyday AI Conference in London, New York & Bengaluru! REGISTER NOW

How to access Sharepoint plugin apis

Solved!
zeno_11
Level 3
How to access Sharepoint plugin apis

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.

0 Kudos
1 Solution
AlexB
Dataiker
Dataiker

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

View solution in original post

0 Kudos
2 Replies
AlexB
Dataiker
Dataiker

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

0 Kudos
zeno_11
Level 3
Author

Thanks, I was able to write dynamically to the folder (and create subfolders) using the get_writer method. 

0 Kudos