REFRESH TABLE

适用于:勾选“是”Databricks Runtime

使 Apache Spark 缓存的缓存条目失效,其中包括给定表或视图的数据和元数据。 当缓存表或与之关联的查询再次执行时,将以迟缓方式填充无效缓存。

有关刷新流式处理表和具体化视图中的数据,请参阅刷新(具体化视图和流式处理表)

语法

REFRESH [TABLE] table_name

有关磁盘缓存与 Apache Spark 缓存之间的差别,请参阅自动和手动缓存

参数

示例

-- The cached entries of the table is refreshed
-- The table is resolved from the current schema as the table name is unqualified.
> REFRESH TABLE tbl1;

-- The cached entries of the view is refreshed or invalidated
-- The view is resolved from tempDB schema, as the view name is qualified.
> REFRESH TABLE tempDB.view1;