- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 11:13 AM
How might I cache a temp table?
The documentation suggests it is possible: https://docs.databricks.com/spark/latest/spark-sql/language-manual/delta-cache.html
Consider the following on DBR 10.5 and Spark 3.2.1:
```
%python
df.createOrReplaceTempView("changeset");
```
```
CACHE SELECT * from changeset
```
`CACHE supports only SELECT queries with optional WHERE clause, e.g. CACHE SELECT <columns> FROM <table> [ WHERE <predicate> ]`
- Labels:
-
DBR
-
SQL
-
Temp Table
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2022 03:12 AM
@Andrew Fogarty , Please check if the doc helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2022 03:12 AM
@Andrew Fogarty , Please check if the doc helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2022 08:35 AM
Thank you! The newer documentation does indeed work for me.

