Brings a materialized view or streaming table into being when it doesn't yet exist, then updates it from whatever its sources currently hold. Streaming tables have CREATE ... IF NOT EXISTS as another option.
Read more: Databricks docs
In the Ultra Transcenders books
Each book explains CREATE OR REFRESH in context, with comparison tables and the common traps.
Terms in this definition
- Materialized view
A view that stores its query output ahead of time. A serverless pipeline maintains it, refreshing it on demand with
REFRESH MATERIALIZED VIEW, on a schedule or when upstream data changes, incrementally when it can. - Streaming table
Delta table built for incremental loading, declared with
CREATE STREAMING TABLE(Databricks SQL or Lakeflow pipelines). Wrapping sources inSTREAM, as inSTREAM read_files(...), reads them as streams. - Streaming
Sending model output piece by piece as server-sent events. Only the delivery changes; the answer's content, completeness and cost stay the same.
- CRUD
Shorthand for create, read, update and delete, the four basic things you do with data. Data-plane roles in Azure Cosmos DB, for instance, authorise those operations on items.
Related terms
- CREATE MATERIALIZED VIEW
Used in SQL to declare this kind of view. Pipeline source files use a longer form,
CREATE OR REFRESH MATERIALIZED VIEW. - CREATE STREAMING TABLE
Used in SQL to declare this kind of table. Pipeline source files use a longer form,
CREATE OR REFRESH STREAMING TABLE.