Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding property file config for materializations #6658

Merged
merged 7 commits into from
Dec 13, 2024
33 changes: 33 additions & 0 deletions website/docs/docs/build/materializations.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ You can also configure [custom materializations](/guides/create-new-materializat
## Configuring materializations
By default, dbt models are materialized as "views". Models can be configured with a different materialization by supplying the `materialized` configuration parameter as shown below.

<Tabs>

<TabItem value="Project file">

<File name='dbt_project.yml'>

```yaml
Expand Down Expand Up @@ -49,6 +53,10 @@ models:

</File>

</TabItem>

<TabItem value="Model file">

Alternatively, materializations can be configured directly inside of the model sql files. This can be useful if you are also setting [Performance Optimization] configs for specific models (for example, [Redshift specific configurations](/reference/resource-configs/redshift-configs) or [BigQuery specific configurations](/reference/resource-configs/bigquery-configs)).

<File name='models/events/stg_event_log.sql'>
Expand All @@ -63,6 +71,31 @@ from ...

</File>

</TabItem>

<TabItem value="Property file">

Materializations can also be configured in the model's `properties.yml` file.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

<File name='models/properties.yml'>

```yaml

mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
version: 2

models:
- name: events
config:
materialized: table

mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
```

</File>

</TabItem>

</Tabs>

## Materializations


Expand Down
Loading