Tables and views in Databricks
This article gives an overview of tables, views, streaming tables, and materialized views in Databricks.
Table
A table is a structured dataset stored in a specific location. The default table type created in Databricks is a Unity Catalog managed table. Tables can be queried and manipulated using SQL commands or DataFrame APIs, supporting operations like INSERT
, UPDATE
, DELETE
, and MERGE INTO
. See What is a table?
View
A view is a virtual table defined by a query that does not store data and can present data from one or more tables in a specific format or abstraction. Views are useful for simplifying complex queries, encapsulating business logic, and providing a consistent interface to the underlying data without duplicating storage. See What is a view?
Materialized view
Similar to a view, a materialized view is defined by a query. However, unlike a view, a materialized view precomputes and stores the query's result. Queries can run faster against materialized view than views, but take up extra storage. You can use Databricks SQL to create and refresh a standalone materialized view or a DLT pipeline to create and refresh one or more materialized views, streaming tables, and views. See Use materialized views in Databricks SQL and Materialized views.
Streaming table
A streaming table is a type of Unity Catalog managed table that includes the processing logic using flows to define it. You can use Databricks SQL to create and refresh a standalone streaming table or a DLT pipeline to create and refresh one or more streaming tables, materialized views, and views. See Use streaming tables in Databricks SQL and Streaming tables.
Materialized view vs. streaming table
Materialized views and :[sts] are two common data objects used for data engineering. Materialized views use batch semantics and streaming tables use streaming semantics. For a comparison between batch and streaming, and considerations for choosing them for your data engineering workloads, see Batch vs. streaming data processing in Databricks.