-
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
Add --target and --profile to global config #9081
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9081 +/- ##
==========================================
- Coverage 88.11% 88.02% -0.09%
==========================================
Files 178 178
Lines 22487 22461 -26
==========================================
- Hits 19815 19772 -43
- Misses 2672 2689 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Doug Beatty <[email protected]>
…nto 7798-global-configs
Question
AnswerOutside of GitHub, @jtcohen6 and I discussed this, and he replied with the following:
DecisionIn light of those considerations, we're going to add |
Any updates on that? In docs I can see: |
Thanks for calling this out @jaklan -- you are right, these docs will need to be updated until this PR is merged+released. I just opened this issue to update the docs in the meantime: dbt-labs/docs.getdbt.com#5111 |
[Preview](https://docs-getdbt-com-git-dbeatty10-patch-2-dbt-labs.vercel.app/reference/global-configs/about-global-configs#available-flags) ## What are you changing in this pull request and why? See #5111 These two things are not accurate: 1. `DBT_TARGET` won't be available until [dbt-core #9081](dbt-labs/dbt-core#9081) is merged+released 1. `DBT_PROFILE` won't be available until [dbt-core #9081](dbt-labs/dbt-core#9081) is merged+released So this PR just removes those environment variable names until then. ## 🎩 After the fix: <img width="600" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/8ffdf967-604d-4686-ab4b-0e295dfea7a0"> ... <img width="600" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/0e522215-d8be-48ce-bb54-d2568e2e9479"> ... <img width="600" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/d58129d0-44c2-481e-a8bb-274fd1276c90"> ## To do - [x] Wait for #5112 to be merged ## 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved from a product and user experience perspective
Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#5134 |
@barton996 @dbeatty10 I have a question about the behavior of the environment variables, though the case might be an edge case. If we set
|
@yu-iskw It is supposed to use the following precedence order:
If this is not the case for |
resolves #7798
Related to pull/7920
Problem
--profile
and--target
are not part of the global config and cannot be set once at env var level without usingenv_var()
inprofiles.yml
. This feature should be provided out of the box as is the case for--profiles-dir
.Solution
--profile
and--target
have been elevated to global config and can now be set by theDBT_PROFILE
andDBT_TARGET
env vars.Checklist