Complete the code to define a model as a view in dbt.
materialized: '[1]'
Setting materialized: 'view' creates a view in the database.
Complete the code to define a model as an incremental table in dbt.
materialized: '[1]'
Using materialized: 'incremental' allows dbt to add new data without rebuilding the whole table.
Fix the error in the materialization type to create a temporary model that does not create a table or view.
materialized: '[1]'
ephemeral models do not create tables or views but are compiled into SQL in downstream models.
Fill both blanks to create a model that materializes as a table and uses a unique key for incremental updates.
materialized: '[1]' unique_key: '[2]'
Incremental models need a unique_key to identify new or changed rows. The materialization must be 'incremental'.
Fill all three blanks to create an ephemeral model that selects from a source table and filters rows where status is 'active'.
with source_data as ( select * from [1] ) select * from source_data where [2] = '[3]'
Ephemeral models use ref() to refer to source tables. Filtering by status = 'active' selects only active rows.