Skip to content

Commit

Permalink
Merge branch 'current' into wusanny-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jul 30, 2024
2 parents 15ee56f + 3514253 commit 156fef3
Showing 1 changed file with 34 additions and 0 deletions.
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>

0 comments on commit 156fef3

Please sign in to comment.