Skip to content

Conversation

@mirnawong1
Copy link
Contributor

@mirnawong1 mirnawong1 commented Oct 22, 2025

@mirnawong1 mirnawong1 requested a review from a team as a code owner October 22, 2025 15:23
@vercel
Copy link

vercel bot commented Oct 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
docs-getdbt-com Ready Ready Preview Oct 27, 2025 5:45pm

@github-actions github-actions bot added content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs labels Oct 22, 2025
Copy link
Collaborator

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

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

@mirnawong1 Thank you for the work to document this! It feels pretty clear to me that the current experience is clunky and inconsistent - we need to make it better!

export DBT_ENV_VAR1="my_value"
export DBT_ENV_VAR2="another_value"
```
3. Save and apply the changes using the `:wq` command in the terminal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

:wq is specific to vim - you can just say, "save the file and start a new shell session"


| <div style={{width:'200px'}}>Where to configure</div> | Info | Stays active | Best for |
|---|---|---|---|
| [OS / shell (recommended)](#configure-at-the-os--shell-level) | Configure at the OS / shell level.<br /><br /> Affects all terminals _and_ the dbt extension (after VS Code reload) | Yes<br /> (across sessions) | Using both extension buttons _and_ terminal commands |
Copy link
Collaborator

Choose a reason for hiding this comment

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

From some quick testing - I can confirm this works for running dbtf commands in terminal/shell, but I don't believe this works for VSCE

| [Terminal session](#configure-in-the-terminal-session) | Configure in the terminal session using the `export` command.<br /><br /> Affects the current terminal window _only_. | No<br /> (per session) | Quick, temporary testing |

:::tip Recommendation
If you use both the dbt extension’s buttons/menus _and_ the terminal, define your env vars at the _OS/shell_ level. This works everywhere with one setup.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not convinced this actually works! Also, I don't love encouraging users to stick their dbt-specific env vars within their global OS user settings / shell profiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants