- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 08:40 AM
Databricks docs here:
https://docs.databricks.com/notebooks/notebook-isolation.html
state that "Every notebook attached to a cluster has a pre-defined variable named spark that represents a SparkSession."
What if 2 users run the same notebook on the same cluster? Will they share the session? Or is the Spark session user-specific also in addition to cluster- & notebook-specific?
Thanks.
- Labels:
-
Sparksession
-
Users
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 12:19 PM
The spark session is isolated at the notebook level and is not isolated at the user level. So, two users accessing the same notebook will be using the same spark session

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 10:49 PM
Hi @Fijoy Vadakkumpadan
Great to meet you, and thanks for your question!
Let's see if your peers in the community have an answer to your question. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 12:19 PM
The spark session is isolated at the notebook level and is not isolated at the user level. So, two users accessing the same notebook will be using the same spark session
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 12:56 PM
Thanks @Lakshay Goel for the response. Follow up question: can the same notebook be attached to 2 different clusters at the same time by 2 different users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 12:25 PM
No, we cannot attach the same notebook to 2 different clusters.

