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

Clarify --strict flag usage #337

Merged
merged 2 commits into from
Aug 17, 2020
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion website/docs/reference/global-cli-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ $ dbt --no-write-json run

## Strict

The `-S` or `--strict` flag runs schema validations on dbt objects at runtime. This flag may incur a performance penalty, but it is useful for catching logic errors in development of the dbt project.
The `-S` or `--strict` flag runs schema validations on dbt python objects at runtime. This flag may incur a performance penalty, but it is useful for catching logic errors in development of the dbt project.

**N.B.** In versions >=0.15.0, dbt uses [hologram](https://github.com/fishtown-analytics/hologram) and [mypy](http://mypy-lang.org/) for object type declaration, validation, and testing. The `--strict` flag has no functional use except as an alias for `--warn-error`. We may choose to someday repurpose it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if it truly is functionally the same as --warn-error we should use that as the entire description, ya know?

The -S or --strict flag is equivalent to the --warn-error flag. We may choose to someday repurpose it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple things strict does:

  • we do an extra validate call in some paths when you set --strict. This can be really slow as it requires serializing the object to json to validate it.
  • Connections type checks
  • some internal consistency checks during compilation

There's still no reason users should use --strict over --warn-error. We should rename the flags so --strict is just an alias for --warn-error and --strict becomes --strict-development-checks or something similarly verbose and obnoxious. You should only run it automatically via integration tests anyway.


<File name='Usage'>

Expand Down