Forum Discussion
notebookutils.fs.cp() cannot copy from Lakehouse shortcut to Files in Python notebook
- 1 month ago
Hi svencken,
notebookutils.fs.cp() is documented to support copying across file systems. In Fabric Python notebooks, cp() uses the same AzCopy-based mechanism as fastcp().
Microsoft also documents SharePoint folders as supported OneLake shortcut sources. However, the linked documentation does not explicitly list this specific SharePoint shortcut → Lakehouse Files AzCopyFailedException as a known limitation.
Since the two-step copy from the shortcut to notebook-local storage and then to Lakehouse Files succeeds, this approach can be used as a workaround in your environment.
NotebookUtils file system utilities for Fabric - Microsoft Fabric | Microsoft Learn
Create a OneDrive or SharePoint shortcut - Microsoft Fabric | Microsoft Learn
Unify Data Sources With OneLake Shortcuts - Microsoft Fabric | Microsoft LearnUnify Data Sources With OneLake Shortcuts - Microsoft Fabric | Microsoft Learn
Thank you.
Hi svencken,
notebookutils.fs.cp() is documented to support copying across file systems. In Fabric Python notebooks, cp() uses the same AzCopy-based mechanism as fastcp().
Microsoft also documents SharePoint folders as supported OneLake shortcut sources. However, the linked documentation does not explicitly list this specific SharePoint shortcut → Lakehouse Files AzCopyFailedException as a known limitation.
Since the two-step copy from the shortcut to notebook-local storage and then to Lakehouse Files succeeds, this approach can be used as a workaround in your environment.
NotebookUtils file system utilities for Fabric - Microsoft Fabric | Microsoft Learn
Create a OneDrive or SharePoint shortcut - Microsoft Fabric | Microsoft Learn
Unify Data Sources With OneLake Shortcuts - Microsoft Fabric | Microsoft LearnUnify Data Sources With OneLake Shortcuts - Microsoft Fabric | Microsoft Learn
Thank you.