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

Dbt list #3136

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
103 changes: 0 additions & 103 deletions website/docs/docs/deploy/about-state.md

This file was deleted.

14 changes: 14 additions & 0 deletions website/docs/guides/migration/versions/02-upgrading-to-v1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Changes planned for v1.5:
- Renaming ["global configs"](global-configs) for consistency ([dbt-core#6903](https://github.com/dbt-labs/dbt-core/issues/6903))
- Moving `log-path` and `target-path` out of `dbt_project.yml` for consistency with other global configs ([dbt-core#6882](https://github.com/dbt-labs/dbt-core/issues/6882))
- As described in [dbt-core#7169](https://github.com/dbt-labs/dbt-core/pull/7169), command-line parameters that could be silent before will no longer be silent. See [dbt-labs/dbt-core#7158](https://github.com/dbt-labs/dbt-core/issues/7158) and [dbt-labs/dbt-core#6800](https://github.com/dbt-labs/dbt-core/issues/6800) for more examples of the behavior we are fixing.
- `dbt list` will no longer suppress `INFO` level logs. To pipe the results of dbt list to a file or another process, and exclude unrelated log messages from the output, you can use either of the following flags:
- `dbt --log-level warn ls` — equivalent to previous default behavior.
- `dbt --quiet ls` — suppresses anything less than ERROR level, except for "printed" messages.

### For consumers of dbt artifacts (metadata)

Expand All @@ -46,6 +49,17 @@ The manifest schema version will be updated to `v9`. Specific changes:
- Addition of `access` as a top-level node config for models
- Addition of `group` and `contract` as node configs

### For users of env vars

The following env vars have been renamed:

- `DBT_DEFER_TO_STATE` → `DBT_DEFER`
- `DBT_FAVOR_STATE_MODE` → `DBT_FAVOR_STATE`
- `DBT_NO_PRINT` → `DBT_PRINT`
- `DBT_ARTIFACT_STATE_PATH` → `DBT_STATE`

Backward compatibility with the old syntax is still supported but will be removed in an as-of-yet-undetermined future released.

### For maintainers of adapter plugins

For more detailed information and to ask any questions, please visit [dbt-core/discussions/6624](https://github.com/dbt-labs/dbt-core/discussions/6624).
Expand Down
25 changes: 25 additions & 0 deletions website/docs/reference/global-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ $ dbt --quiet run

### Suppress `print()` messages in stdout

<VersionBlock lastVersion="1.4">

By default, dbt includes `print()` messages in standard out (stdout). You can use the `NO_PRINT` config to prevent these messages from showing up in stdout.

<File name='profiles.yml'>
Expand All @@ -367,6 +369,29 @@ config:

</File>

</VersionBlock>

<VersionBlock firstVersion="1.5">

By default, dbt includes `print()` messages in standard out (stdout). You can use the `PRINT` config to prevent these messages from showing up in stdout.

<File name='profiles.yml'>

```yaml
config:
print: false
```

</File>

:::warning Syntax deprecation

The original `NO_PRINT` syntax has been deprecated, starting with dbt v1.5. Backward compatibility is supported but will be removed in an as-of-yet-undetermined future release.

:::

</VersionBlock>

Supply `--no-print` flag to `dbt run` to suppress `print()` messages from showing in stdout.

```text
Expand Down
10 changes: 10 additions & 0 deletions website/docs/reference/node-selection/defer.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,18 @@ When using defer, you may be selecting from production datasets, development dat
- if you apply env-specific limits in dev but not prod, as you may end up selecting more data than you expect
- when executing tests that depend on multiple parents (e.g. `relationships`), since you're testing "across" environments

<VersionBlock lastVersion="1.4">

Deferral requires both `--defer` and `--state` to be set, either by passing flags explicitly or by setting environment variables (`DBT_DEFER_TO_STATE` and `DBT_ARTIFACT_STATE_PATH`). If you use dbt Cloud, read about [how to set up CI jobs](/docs/deploy/cloud-ci-job).

</VersionBlock>

<VersionBlock firstVersion="1.5">

Deferral requires both `--defer` and `--state` to be set, either by passing flags explicitly or by setting environment variables (`DBT_DEFER` and `DBT_STATE`). If you use dbt Cloud, read about [how to set up CI jobs](/docs/deploy/cloud-ci-job).

</VersionBlock>

<VersionBlock firstVersion="1.4">

#### Favor state
Expand Down
26 changes: 26 additions & 0 deletions website/docs/reference/node-selection/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,18 @@ that defines it. For more information about how generic tests are defined, read

**N.B.** State-based selection is a powerful, complex feature. Read about [known caveats and limitations](node-selection/state-comparison-caveats) to state comparison.

<VersionBlock lastVersion="1.4">

The `state` method is used to select nodes by comparing them against a previous version of the same project, which is represented by a [manifest](artifacts/manifest-json). The file path of the comparison manifest _must_ be specified via the `--state` flag or `DBT_ARTIFACT_STATE_PATH` environment variable.

</VersionBlock>

<VersionBlock firstVersion="1.5">

The `state` method is used to select nodes by comparing them against a previous version of the same project, which is represented by a [manifest](artifacts/manifest-json). The file path of the comparison manifest _must_ be specified via the `--state` flag or `DBT_STATE` environment variable.

</VersionBlock>

`state:new`: There is no node with the same `unique_id` in the comparison manifest

`state:modified`: All new nodes, plus any changes to existing nodes.
Expand Down Expand Up @@ -222,11 +232,27 @@ The following dbt commands produce `sources.json` artifacts whose results can be

After issuing one of the above commands, you can reference the source freshness results by adding a selector to a subsequent command as follows:

<VersionBlock lastVersion="1.4">

```bash
# You can also set the DBT_ARTIFACT_STATE_PATH environment variable instead of the --state flag.
$ dbt source freshness # must be run again to compare current to previous state
$ dbt build --select source_status:fresher+ --state path/to/prod/artifacts
```

</VersionBlock>

<VersionBlock firstVersion="1.5">

```bash
# You can also set the DBT_STATE environment variable instead of the --state flag.
$ dbt source freshness # must be run again to compare current to previous state
$ dbt build --select source_status:fresher+ --state path/to/prod/artifacts
```

</VersionBlock>


</VersionBlock>


Expand Down