Cache TableΒΆ

CACHE [LAZY] TABLE [db_name.]table_name

Cache the contents of the table in memory using the RDD cache. Subsequent queries on this table will bypass scanning the original files containing its contents as much as possible.

LAZY
Cache the table lazily instead of eagerly scanning the entire table.

See the DBIO cache documentation page to find out about the differences between the RDD cache and the Databricks IO cache.