cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cache Select on Temp Table?

auser85
New Contributor III

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> ]`

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Databricks Employee
Databricks Employee
2 REPLIES 2

Prabakar
Databricks Employee
Databricks Employee

auser85
New Contributor III

Thank you! The newer documentation does indeed work for me.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now