Global CLI flags

dbt commands (eg. run, test, etc) support their own command-specific CLI flags. In addition to these command specific flags, the dbt command itself supports "global" flags applicable to all subcommands.


The --version flag returns information about the currently installed version of dbt.

$ dbt --version
installed version: 0.15.1
latest version: 0.15.1
Up to date!

Record timing info

The -r or --record-timing-info flag saves performance profiling information to a file. This file can be visualized with snakeviz to understand the performance characteristics of a dbt invocation

$ dbt -r timing.txt run
$ snakeviz timing.txt


The -d or --debug flag redirects dbt's debug logs to standard out. The has the effect of showing debug-level log information in the terminal in addition to the logs/dbt.log file. This output is verbose.

$ dbt --debug run

Log Formatting

The --log-format flag specifies how dbt's logs should be formatted. The value for this flag can be one of: text, json, or default. Use the json formatting value in conjunction with the --debug flag to produce rich log information which can be piped into monitoring tools for analysis.

When json log formatting is used, each log line will have the following JSON properties:

  • timestamp: when the log line was printed
  • message: the textual log message
  • channel: the source for the log (eg. dbt, or some_module)
  • level: an integer indicating the log level for the log line (10=info, 11=debug, ...)
  • levelname: a string representation of the log level
  • thread_name: the thread in which the log message was produced
  • process: the PID for the running dbt invocation which produced this log message
  • extra: a dictionary containing "extra" information about the log line. This contents of this dictionary vary based on the specific log message that is being emitted. This dictionary contains programmatically accessible information to contextualize the log message.
$ dbt --log-format json run
{"timestamp": "2019-11-24T18:51:48.683295Z", "message": "Running with dbt=0.15.0", "channel": "dbt", "level": 11, "levelname": "INFO", "thread_name": "MainThread", "process": 94207, "extra": {"run_state": "internal"}}
{"timestamp": "2019-11-24T18:51:49.386586Z", "message": "Found 3 models, 0 tests, 1 snapshot, 0 analyses, 120 macros, 0 operations, 2 seed files, 1 source", "channel": "dbt", "level": 11, "levelname": "INFO", "thread_name": "MainThread", "process": 94207, "extra": {"run_state": "internal"}}

Writing JSON artifacts

The --no-write-json flag prevents dbt from writing JSON artifacts (eg. manifest.json, run_results.json) to the target/ directory. JSON serialization can be slow, and this flag may make invocations of dbt faster.

$ dbt --no-write-json run


The -S or --strict flag is only for use during dbt development. It performs extra validation of dbt objects and internal consistency checks during compilation. Use of this flag incurs a significant performance penalty. We use it only when running integration tests against proposed changes to dbt.

$ dbt --strict run

Warnings as Errors

The --warn-error flag converts dbt warnings into errors. If dbt would normally warn, it will instead raise an error. Examples include --models selectors that selects nothing, deprecations, configurations with no associated models, or invalid test configurations.

$ dbt --warn-error run

Partial Parsing

The --partial-parse and --no-partial-parse flags can be used to configure partial parsing in your project. See the docs on partial parsing for more information on using this flag.

$ dbt --partial-parse run