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: 

Serverless Compute no support for Caching data frames

Dave1967
New Contributor III

Can anyone please tell me why df.cache() and df.persist() are not supported in Serevrless compute?

Many Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

gchandra
Databricks Employee
Databricks Employee

Global caching functionality (and other global states used on classic clusters) is conceptually hard to represent on serverless computing.

Serverless spark cluster optimizes the cache than the user.



~

View solution in original post

3 REPLIES 3

gchandra
Databricks Employee
Databricks Employee

Global caching functionality (and other global states used on classic clusters) is conceptually hard to represent on serverless computing.

Serverless spark cluster optimizes the cache than the user.



~

Dave1967
New Contributor III

Many Thanks

kunalmishra9
New Contributor III

What I do wish was possible was for serverless to warn that caching is not supported, but not error on a call. It makes switching between compute (serverless & all purpose) brittle and prevents code from easily being interoperable, no matter the compute type, which is significant friction against adopting serverless completely. Even having a parameter (i.e. .cache(try=True) ), would be nice to support this kind of workflow more elegantly.

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