Forum Discussion
dbeavon3
1 year agoMemorable Member
Error when getting the workspace name from a notebook
I'm just trying to get the workspace name from a workbook with notebookutils and it is choking and dying. This error happens when running the notebook as a service principal. this_workspace_name ...
chetanhiwale
1 year agoResolver I
Hi dbeavon3 ,
You can use this, to retrive current workspace name.
notebookutils.runtime.context.currentWorkspaceName()Ref : https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#runtime-utilities
- dbeavon31 year agoMemorable Member
That is helpful. I'll test. I'm assuming it works in both python notebooks and pyspark?