Skip to content

Commit

Permalink
Example of using the "config" selection method for meta (#5856)
Browse files Browse the repository at this point in the history
[Preview](https://docs-getdbt-com-git-dbeatty10-patch-1-dbt-labs.vercel.app/reference/node-selection/methods#the-config-method)

## What are you changing in this pull request and why?

The ["config" selector
method](https://docs.getdbt.com/reference/node-selection/methods#the-config-method)
can be used to select models that match a specified [node
config](https://docs.getdbt.com/reference/configs-and-properties).

There's a [`meta`
config](https://docs.getdbt.com/reference/resource-configs/meta) for the
following resource types, which can be selected via the "config"
selector method:
- Models
- Sources
- Seeds
- Snapshots
- Singular Data Tests
- Semantic Models
- Metrics
- Saved queries

The "config" selector method doesn't currently work `meta` within the
following resource types currently though (either because `meta` isn't
supported at all or because it is not underneath `config`):
- doesn't support `meta` at all:
  - Generic Data Tests
  - Unit Tests
  - Analyses
- `meta` not underneath `config`
  - Macros
  - Exposures

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.

Co-authored-by: Mirna Wong <[email protected]>
  • Loading branch information
dbeatty10 and mirnawong1 authored Jul 30, 2024
1 parent b5d0af8 commit 0af46d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/docs/reference/node-selection/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ For example, given a model with the following configurations:
materialized = 'incremental',
unique_key = ['column_a', 'column_b'],
grants = {'select': ['reporter', 'analysts']},
meta = {"contains_pii": true},
transient = true
) }}

Expand All @@ -144,6 +145,7 @@ select ...
dbt ls -s config.materialized:incremental
dbt ls -s config.unique_key:column_a
dbt ls -s config.grants.select:reporter
dbt ls -s config.meta.contains_pii:true
dbt ls -s config.transient:true
```
Expand Down

0 comments on commit 0af46d8

Please sign in to comment.