共用方式為


REFRESH TABLE

適用於: 核取記號為「是」 Databricks Runtime

使 Apache Spark 快取的快取專案失效,其中包含指定數據表或檢視表的數據和元數據。 當再次執行快取資料表或與其相關聯的查詢時,會以延遲方式填入無效的快取。

請參閱 REFRESH(MATERIALIZED VIEW 或 STREAMING TABLE), 以重新整理串流數據表和具體化檢視中的數據。

語法

REFRESH [TABLE] table_name

如需磁碟快取與 Apache Spark 快取之間的差異,請參閱 磁碟快取與 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;