-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
More consistency for global CLI flags #2990
Labels
Comments
jtcohen6
added
enhancement
New feature or request
1.0.0
Issues related to the 1.0.0 release of dbt
labels
Jan 2, 2021
See also:
|
|
This was referenced Jul 6, 2021
gshank
added a commit
that referenced
this issue
Aug 31, 2021
4 tasks
gshank
added a commit
that referenced
this issue
Sep 1, 2021
gshank
added a commit
that referenced
this issue
Sep 13, 2021
gshank
added a commit
that referenced
this issue
Sep 13, 2021
gshank
added a commit
that referenced
this issue
Sep 13, 2021
gshank
added a commit
that referenced
this issue
Sep 13, 2021
gshank
added a commit
that referenced
this issue
Sep 13, 2021
gshank
added a commit
that referenced
this issue
Sep 13, 2021
gshank
added a commit
that referenced
this issue
Sep 22, 2021
gshank
added a commit
that referenced
this issue
Sep 22, 2021
gshank
added a commit
that referenced
this issue
Sep 22, 2021
[#2990] Normalize global CLI args/flags
iknox-fa
pushed a commit
that referenced
this issue
Feb 8, 2022
automatic commit by git-black, original commits: 779c789
iknox-fa
pushed a commit
that referenced
this issue
Feb 8, 2022
iknox-fa
pushed a commit
that referenced
this issue
Feb 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the feature
Every "global" CLI flag should:
dbt --global-flag run
)If set in multiple ways, the hierarchy should always be: flag > env var > profile config.
Each flag should have a corresponding and addressable Jinja value, perhaps under
flags
. While e.g.{{env_var(DBT_NO_WRITE_JSON)}}
should only return true if the specific environment variable is on, I think that the value of{{flags.NO_WRITE_JSON}}
should be true whether set by CLI flag, env var, or profile config.Current global flags/configs
I'm not talking about standard CLI fare, such as
--version
and--help
.-r
,--record-timing-info
-d
,--debug
--log-format
--no-write-json
-S
,--strict
: I believe we should retire this one, since it no longer serves a functional purpose and users think it does something different (strict field validation for schema.yml #1570, Clarify --strict flag usage docs.getdbt.com#337)--warn-error
--partial-parse
,config.partial_parse
--use-colors
,--no-use-colors
,config.use_colors
: needs documentation updateconfig.printer_width
config.anonymous_usage_stats
(see also: Support console env var DO_NOT_TRACK #3540)--use-experimental-parser
Proposed
I do think that some flags should be promoted to "global" status:
--no-version-check
: Right now, it works for some subcommands but not others, and I personally find it pesky to remember which ones are which. It should work for every subcommand and precede the subcommand.-x
,--fail-fast
: Supported forrun
andtest
, why not all the rest?--profiles-dir
,DBT_PROFILES_DIR
: Already global, it should also be supported when preceding the subcommand.Documentation
We should then create a handy table of environment variables available to dbt's invocation context. That would include:
DBT_DEFER_TO_STATE
+DBT_ARTIFACT_STATE_PATH
We might also mention there that:
DBT_ENV_CUSTOM_ENV_
will appear in themetadata.env
dict of dbt JSON artifactsDBT_ENV_SECRET_
will be scrubbed from logs{{env_var()}}
Describe alternatives you've considered
Who will this benefit?
The text was updated successfully, but these errors were encountered: