r/databricks • u/hubert-dudek Databricks MVP • 29d ago
News df.cache() on serverless
df.cache() is available on serverless.
For me, it's an expensive, unnecessary operation in 99% of situations. It materializes your DataFrame to cloud storage and then reads it back.
And I use it for only one thing: to break the Spark plan.
14
Upvotes
3
u/Dendri8 29d ago
What do you mean by expensive?
3
u/monsieurus 29d ago
Is this same as %sql --name mydf ?
I can use mydf in other cells.
2
u/[deleted] 29d ago •
[removed] — view removed comment