Forum Discussion
PDFs from Sharepoint to Fabric
- 1 year ago
Hi danitskofabric,
Thank you for reaching out to the Microsoft Fabric Community Forum. Also, thanks to tayloramy, for those inputs on this issue.
I understand the challenge, you have got PDFs sitting in SharePoint that you would like to work with directly inside a Fabric Notebook, but Power Automate isn’t an option due to policy restrictions.
Use the SharePoint/OneDrive connector in Fabric to pull the PDFs into your Lakehouse. Once they’re there, you can process them in your Notebook with Python libraries like PyPDF2 or pymupdf.
https://learn.microsoft.com/en-us/fabric/data-factory/connector-sharepoint-folder-overview
https://learn.microsoft.com/en-us/fabric/data-factory/connector-sharepoint-online-list
https://learn.microsoft.com/en-us/fabric/data-factory/connector-sharepoint-folderIf your org allows API access, you can use the Microsoft Graph API inside your Notebook to read the files directly from SharePoint. Here’s a starting point:
https://learn.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0If this is a one-off, you can also manually upload the PDFs into your Lakehouse and process them from there.
Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
Use graph apis in Fabric notebook and save the PDFs to lakehouse files section using Python file writing methods. Make sure to mount the desired lakehouse using notebookutils and use the returned mount path for Python file write methods. Works like a charm.