-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'current' into wusanny-patch-1
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
website/docs/reference/dbt-jinja-functions/properties-yml-context.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: " About properties.yml context" | ||
sidebar_label: "properties.yml context" | ||
id: "dbt-properties-yml-context" | ||
description: "The context methods and variables available when configuring resources in a properties.yml file." | ||
--- | ||
|
||
The following context methods and variables are available when configuring | ||
resources in a `properties.yml` file. | ||
|
||
**Available context methods:** | ||
- [env_var](/reference/dbt-jinja-functions/env_var) | ||
- [var](/reference/dbt-jinja-functions/var) | ||
|
||
**Available context variables:** | ||
- [target](/reference/dbt-jinja-functions/target) | ||
- [builtins](/reference/dbt-jinja-functions/builtins) | ||
- [dbt_version](/reference/dbt-jinja-functions/dbt_version) | ||
|
||
### Example configuration | ||
|
||
<File name='properties.yml'> | ||
|
||
```yml | ||
# Configure this model to be materialized as a view | ||
# in development and a table in production/CI contexts | ||
|
||
models: | ||
- name: dim_customers | ||
config: | ||
materialized: "{{ 'view' if target.name == 'dev' else 'table' }}" | ||
``` | ||
</File> |