Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shietpas_cbts
Frequent Visitor

mssparkutils.notebook.run not running notebooks in isolated session context

When calling multiple notebooks using the mssparkutils, they do not run in thread-safe manner and will share session context veriables. This is true if you call two notebooks sequentially using mssparkutils.notebook.run sequentally in a notebook or if you call in parallel using mssparkutils.notebook.runMultiple(). In either case, values set in session using 

spark.conf.set will be visible by other other notebooks. And if running in parallel, the notebooks may interfere with each other if using the same variable names.
 
Temporary Views are also shared across their sessions, which could also create issues.
 
DBUtils runs notebooks in isoluation and I believe mssparkutils should also run in isolation.
1 ACCEPTED SOLUTION

Hi @shietpas_cbts ,

Apologies for the delay in response, we have an update from the internal team -

spark.conf.set will be share in child notebooks, but local variable in the notebook will not be shared by other notebooks.



Hope this is helpful. Please let me know incase of further queries.

View solution in original post

4 REPLIES 4
v-gchenna-msft
Community Support
Community Support

Hi @shietpas_cbts ,

Thanks for using Fabric Community.
At this time, we are reaching out to the internal team to get some help on this .
We will update you once we hear back from them.

Hi @shietpas_cbts ,

Apologies for the delay in response, we have an update from the internal team -

spark.conf.set will be share in child notebooks, but local variable in the notebook will not be shared by other notebooks.



Hope this is helpful. Please let me know incase of further queries.

Glad to know that your query got resolved. Please continue using Fabric Community on your further queries.

v-yetao1-msft
Community Support
Community Support

Hi  @shietpas_cbts 

The Issues forum is for posts dealing with Power BI related errors. I have moved your post to the corresponding forum. Thank you for your cooperation.

 

Best Regards,
Community Support Team _ Ailsa Tao

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

March 2024  FBC Gallery Image

Fabric Monthly Update - March 2024

Check out the March 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors