Forum Discussion
VoltesDev
1 year agoHelper V
Need guide: PySpark (Fabric runtime)
Hello good people, I have requirement in my Fabric Notebook to read Excel file put in Lakehouse. And my Fabric now is in Trial Mode. The requirement, is to use "msparkutils" and I start it wi...
- 1 year ago
Hi VoltesDev
mssparkutlis has been officially renamed to NotebookUtils. Pls look on below snapshot
Read full article from here: NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
It helps you reolve your issue.
Thank you!!
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
burakkaragoz
1 year agoSuper User
Hi VoltesDev ,
The issue you're facing is due to the notebook session type. The msparkutils module is only available when your notebook is running under the "PySpark (Fabric runtime)" session—not the standard "PySpark (Python)" session.
Here's what you can do:
Switch the Session Type:
- In your notebook, look at the top where it says "PySpark (Python)".
- Click on it and change it to "PySpark (Fabric runtime)".
- If you don’t see that option, it might be because:
- You're not in a Lakehouse-attached notebook, or
- Your trial environment doesn’t support the Fabric runtime yet.
Ensure You're in a Lakehouse Context:
- Open your Lakehouse.
- From there, click “New Notebook” directly inside the Lakehouse.
- This ensures the notebook is properly linked and the Fabric runtime is available.
Trial Mode Limitation:
- Some trial environments may have limited runtime options. If the Fabric runtime is not available, you might need to request access or wait until it’s enabled for your tenant.
Let me know if you want help checking your environment or switching the session!