
Answer-first summary for fast verification
Answer: Table
The correct answer is **Table**. Here’s why: - **Tables**: In Databricks, tables are persistent data structures. They store data in a storage location (like cloud storage) and are available even after a cluster is restarted. They are designed for long-term storage and retrieval. - **Views**: Views are essentially saved queries. They don’t store the data themselves; they just define how to retrieve it. While the definition of a view might persist (depending on how it’s created), the view itself is not materialized. When a cluster restarts, you’d need to recreate any views. - **Temporary Views**: Temporary views are session-bound. They only exist within the context of a specific Spark session. When the cluster restarts (which creates a new session), temporary views are lost. - **Global Temporary Views**: Global temporary views are tied to the Spark application, not the cluster. While they’re available across multiple sessions within the same application, they are still temporary. If the cluster restarts, the application goes down, and the global temporary views are lost. Therefore, only tables are persisted across Databricks cluster restarts.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.