-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Packages.yml page #8433
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
Merged
Merged
Packages.yml page #8433
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
88125fc
Packages.yml page
nataliefiann 157fd7b
Merge branch 'current' into nfiann-packagesyml
mirnawong1 878aec9
Update website/docs/reference/dbt-jinja-functions/packages.yml.md
nataliefiann ce55910
Merge branch 'current' into nfiann-packagesyml
nataliefiann 462a911
Added examples
nataliefiann 1ec132b
Added env_var example
nataliefiann dc97dce
Merge branch 'current' into nfiann-packagesyml
mirnawong1 9ad1234
Updated examples
nataliefiann 9cbdbc4
Merge branch 'current' into nfiann-packagesyml
nataliefiann cd04311
Update website/docs/reference/dbt-jinja-functions/packages.yml.md
nataliefiann 617a6ec
Merge branch 'current' into nfiann-packagesyml
nataliefiann 3952c6e
Merge branch 'current' into nfiann-packagesyml
nataliefiann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
website/docs/reference/dbt-jinja-functions/packages.yml.md
This file contains hidden or 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,62 @@ | ||
| --- | ||
| title: "About packages.yml context" | ||
| sidebar_label: "packages.yml context" | ||
| id: "packages.yml context" | ||
| description: "Use these context methods to configure dependencies in the packages.yml file." | ||
| --- | ||
|
|
||
| The following context methods and variables are available when configuring a `packages.yml` file. | ||
|
|
||
| **Available context methods:** | ||
| - [env_var](/reference/dbt-jinja-functions/env_var) | ||
| - Use `env_var()` in any dbt YAML file that supports Jinja. Only `packages.yml` and `profiles.yml` support environment variables for [secure values](/docs/build/dbt-tips#yaml-tips) (using the `DBT_ENV_SECRET_` prefix). | ||
| - [var](/reference/dbt-jinja-functions/var) (Note: only variables defined with `--vars` are available. Refer to [YAML tips](/docs/build/dbt-tips#yaml-tips) for more information) | ||
|
|
||
| **Available context variables:** | ||
| - [builtins](/reference/dbt-jinja-functions/builtins) | ||
| - [dbt_version](/reference/dbt-jinja-functions/dbt_version) | ||
| - [target](/reference/dbt-jinja-functions/target) | ||
|
|
||
nataliefiann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Example usage | ||
|
|
||
| The following examples show how to use the different context methods and variables in your `packages.yml`. | ||
|
|
||
| Use `builtins` in your `packages.yml`: | ||
|
|
||
| ``` | ||
| packages: | ||
| - package: dbt-labs/dbt_utils | ||
| version: "{% if builtins is defined %}0.14.0{% else %}0.13.1{% endif %}" | ||
|
|
||
| ``` | ||
|
|
||
| Use `env_var` in your `packages.yml`: | ||
|
|
||
| ``` | ||
| packages: | ||
| - package: dbt-labs/dbt_utils | ||
| version: "{{ env_var('DBT_UTILS_VERSION') }}" | ||
| ``` | ||
|
|
||
| Use `dbt_version` in your `packages.yml`: | ||
|
|
||
| ``` | ||
| packages: | ||
| - package: dbt-labs/dbt_utils | ||
| version: "{% if dbt_version is defined %}0.14.0{% else %}0.13.1{% endif %}" | ||
|
|
||
| ``` | ||
|
|
||
| Use `target` in your `packages.yml`: | ||
|
|
||
| ``` | ||
|
|
||
| packages: | ||
| - package: dbt-labs/dbt_utils | ||
| version: "{% if target.name == 'prod' %}0.14.0{% else %}0.13.1{% endif %}" | ||
|
|
||
| ``` | ||
|
|
||
| ## Related docs | ||
|
|
||
| - [Packages](/docs/build/packages) | ||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.