Note: This is similar to how traditional databases offer a materialized view feature to declaratively manage expensive aggregation and join operations.
Process Overview
The process is straightforward:- Define a query on table, optionally including UDFs in the select clause.
- Create the materialized view using
db.create_materialized_view(...). - Populate the new materialized view table using the
refreshoperation.
Example
Let’s walk through an example using a raw video table as a base. We want to create a materialized view off the table that adds transcription columns to a subset of the values.refresh.
add_columns, backfill particular columns and deriving other materialized views or views from them.
Reference: