Skip to content

Commit

Permalink
Document DBT_PRINT / DBT_NO_PRINT environment variables (#4775)
Browse files Browse the repository at this point in the history
[Preview](https://docs-getdbt-com-git-dbeatty-print-no-print-dbt-labs.vercel.app/reference/global-configs/print-output#suppress-print-messages-in-stdout)

resolves #4776

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

I checked from v1.7 back to v1.1, and I couldn't get either of these to
work in any version:

Up to 1.5:
```yaml
config:
  no_print: true
```

1.5 and after:
```yaml
config:
  print: false
```

However, the `DBT_NO_PRINT` / `DBT_PRINT` environment variables and
`--no-print` and `--print` CLI flags _do_ work.

So I think the code example for `profiles.yml` was just accidentally
introduced in the following PRs, and we should remove it because it's
not actually an option for any versions.
- #1319
- #3134

For additional context, see:
- [Upgrading to
v1.1](https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.1#advanced-and-experimental-functionality)
- [Upgrading to
v1.5](https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.5#behavior-changes)
- #1102
- dbt-labs/dbt-core#4701
- #3122
- #3332

## 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.
- [x] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
  • Loading branch information
mirnawong1 authored Jan 23, 2024
2 parents 8ead06e + bede97c commit 219c484
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions website/docs/reference/global-configs/print-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,17 @@ sidebar: "Print output"

<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'>

```yaml
config:
no_print: true
```
</File>
By default, dbt includes `print()` messages in standard out (stdout). You can use the `DBT_NO_PRINT` environment variable to prevent these messages from showing up in stdout.

</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>
By default, dbt includes `print()` messages in standard out (stdout). You can use the `DBT_PRINT` environment variable to prevent these messages from showing up in stdout.

:::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.
The original `DBT_NO_PRINT` environment variable has been deprecated, starting with dbt v1.5. Backward compatibility is supported but will be removed in an as-of-yet-undetermined future release.

:::

Expand All @@ -46,8 +28,6 @@ Supply `--no-print` flag to `dbt run` to suppress `print()` messages from showin

```text
dbt --no-print run
...
```

### Printer width
Expand Down

0 comments on commit 219c484

Please sign in to comment.