materialized
- Project file
- Property file
- Config block
dbt_project.yml
config-version: 2
models:
<resource-path>:
+materialized: <materialization_name>
models/properties.yml
version: 2
models:
- name: <model_name>
config:
materialized: <materialization_name>
models/<model_name>.sql
{{ config(
materialized="<materialization_name>"
) }}
select ...
Definition
Materializations are strategies for persisting dbt models in a warehouse. These are the materialization types built into dbt:
ephemeral
— ephemeral models are not directly built into the databasetable
— a model is rebuilt as a table on each runview
— a model is rebuilt as a view on each runmaterialized_view
— allows the creation and maintenance of materialized views in the target databaseincremental
— incremental models allow dbt to insert or update records into a table since the last time that model was run
You can also configure custom materializations in dbt. Custom materializations are a powerful way to extend dbt's functionality to meet your specific needs.
0