How can I create a table that's visible only to a specific run of a notebook?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 08:24 AM
I'd like to create an SQL table in a notebook that's visible to a specific run (session?) of a notebook. Meaning, even if 2 different users run that notebook at the same time, there should be no conflict. And the table should go away once the notebook exits.
How do I do that?
Is a "create temporary view" statement the way to go?
Given views need to be recomputed every time they're accessed, does Databricks have a notion of a "temporary table" that's specific to a run of a notebook?
Thanks.
- Labels:
-
Session
-
Sql table
-
Table
-
Temporary View

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 12:01 AM
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-28-2023 04:06 PM
For now ‘CREATE TEMPORARY VIEW’ is the way to go. Once you read from it once, the following reads are going to be cached so it won’t be recomputed every time.

