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 new indirect selection pages #4977

Merged
merged 25 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5953e66
addinb new indirect selection pages
runleonarun Feb 22, 2024
274a7e0
Merge branch 'current' into indirect-selection4773
runleonarun Feb 22, 2024
2138588
adding to sidebar
runleonarun Feb 22, 2024
27198cc
closing file
runleonarun Feb 22, 2024
9ca6e38
Merge branch 'indirect-selection4773' of github.com:dbt-labs/docs.get…
runleonarun Feb 22, 2024
874d911
fixing the env var example
runleonarun Feb 22, 2024
2fc4a11
Merge branch 'current' into indirect-selection4773
runleonarun Feb 22, 2024
86b8320
fix example sentences
runleonarun Feb 22, 2024
8d05854
Update website/dbt-versions.js
runleonarun Feb 22, 2024
923bbbf
Apply suggestions from code review
runleonarun Feb 23, 2024
0115fbb
Apply suggestions from code review
runleonarun Feb 23, 2024
0a63a33
Update website/docs/reference/global-configs/indirect-selection.md
runleonarun Feb 23, 2024
f496f90
Merge branch 'jerco/flags-behavior-changes' into indirect-selection4773
runleonarun Feb 26, 2024
4259f83
Merge branch 'jerco/flags-behavior-changes' into indirect-selection4773
runleonarun Feb 26, 2024
b434f2f
Update profiles.yml.md
runleonarun Feb 26, 2024
a53d79a
Apply suggestions from code review
runleonarun Feb 26, 2024
02f2113
adding backindirect selection
runleonarun Feb 26, 2024
72a379a
Apply suggestions from code review
runleonarun Feb 26, 2024
3bcf36b
Updating profiles.yml
matthewshaver Feb 26, 2024
e38d6ef
Merge branch 'indirect-selection4773' into profiles-global-configs
matthewshaver Feb 26, 2024
d1c8216
Merge branch 'jerco/flags-behavior-changes' into indirect-selection4773
matthewshaver Feb 26, 2024
28c6049
Merge branch 'indirect-selection4773' into profiles-global-configs
matthewshaver Feb 26, 2024
3970c51
Merge branch 'jerco/flags-behavior-changes' into indirect-selection4773
matthewshaver Feb 26, 2024
54b3d5a
Merge branch 'indirect-selection4773' into profiles-global-configs
matthewshaver Feb 26, 2024
299bd00
Profiles global configs (#4992)
matthewshaver Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions website/dbt-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ exports.versions = [
]

exports.versionedPages = [
{
"page": "/reference/global-configs/indirect-selection",
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
"firstVersion": "1.8",
},
{
"page": "reference/resource-configs/store_failures_as",
"firstVersion": "1.7",
Expand Down
3 changes: 2 additions & 1 deletion website/docs/docs/core/connect-data-platform/profiles.yml.md
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This section identifies the parts of your `profiles.yml` that aren't specific to
[static_parser](/reference/global-configs/parsing): <true | false>
[cache_selected_only](/reference/global-configs/cache): <true | false>
[populate_cache](/reference/global-configs/cache): <true | false>
[indirect_selection](/reference/global-configs/indirect-selection): <eager | cautious | buildable | empty>

<profile-name>:
target: <target-name> # this is the default target
Expand All @@ -56,4 +57,4 @@ This section identifies the parts of your `profiles.yml` that aren't specific to

## User config

You can set default values of global configs for all projects that you run using your local machine. See the docs on [global configs](/reference/global-configs/about-global-configs) for details.
You can set default values of global configs for all projects that you run using your local machine. Read the docs on [global configs](/reference/global-configs/about-global-configs) for details.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
49 changes: 49 additions & 0 deletions website/docs/reference/global-configs/indirect-selection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: "Indirect selection"
id: "indirect-selection"
sidebar: "Indirect selection"
---

Supply the `--indirect_selection` flag to `dbt test` or `dbt build` to configure which tests will be run for the nodes you specify. You can set this as a CLI flag or an environment variable. In dbt Core, you can also configure user configurations in [YAML selectors](/reference/node-selection/yaml-selectors) or in the `config:` block of `profiles.yml`, which sets default values for all projects.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

When all flags are set, CLI configurations take precedence, then environment variables, then user configurations. Read the docs on [global configs](/reference/global-configs/about-global-configs) for details.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

Options are `empty`, `buildable`, `cautious`, and `eager` (default). By default, dbt indirectly selects all tests if they touch any resource you select. Read more about these options in [Indirect selection in Test selection examples](/reference/node-selection/test-selection-examples?indirect-selection-mode=empty#indirect-selection).
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

You can run tests that only refer to selected nodes using a CLI configuration, for example:
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

<File name='Usage'>

```text
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
dbt test --indirect-selection cautious
```

</File>

You can run tests that only refer to selected nodes using an environment variable, for example:
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

<File name='Env var'>

```text

$ export DBT_INDIRECT_SELECTION=cautious
dbt run

```

</File>

You can run tests that only refer to selected nodes using `profiles.yml` user configurations, for example:
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

<File name='profiles.yml'>
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

```yaml

config:
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
indirect_selection: cautious

```

</File>


1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ const sidebarSettings = {
"reference/global-configs/logs",
"reference/global-configs/cache",
"reference/global-configs/failing-fast",
"reference/global-configs/indirect-selection",
"reference/global-configs/json-artifacts",
"reference/global-configs/parsing",
"reference/global-configs/print-output",
Expand Down
Loading