重新整理數據表
適用於: Databricks Runtime
使 Apache Spark 快取的快取專案失效,其中包含指定數據表或檢視表的數據和元數據。 當再次執行快取資料表或與其相關聯的查詢時,會以延遲方式填入無效的快取。
請參閱 REFRESH(MATERIALIZED VIEW 和 STREAMING TABLE), 以重新整理串流數據表和具體化檢視中的數據。
語法
REFRESH [TABLE] table_name
如需磁碟快取與 Apache Spark 快取之間的差異,請參閱 磁碟快取與 Spark 快取。
參數
-
識別要快取的 Delta 數據表或檢視表。 名稱不得包含 時態規格。 如果找不到數據表,Azure Databricks 就會 引發TABLE_OR_VIEW_NOT_FOUND 錯誤。
範例
-- 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;
相關語句
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應