-
Notifications
You must be signed in to change notification settings - Fork 98
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
Extension not picking up env variables from .env file #1554
Comments
@rapha-pereira Have you looked at https://docs.myaltimate.com/setup/optConfig/#environment-variables-setup ? |
Yes, and I tried the method via the settings.json file and it didn't work either. |
@rapha-pereira Can you share the settings.json here? |
@anandgupta42 Examples of my dbt project structure: profiles.yml inside config folder, that folder is in the root of the project:
My .env file, in the root of the project:
|
We rely on the Python VSCode extension to fetch the environment variables. Check the section: https://docs.myaltimate.com/setup/optConfig/#environment-variables-through-pythonenvfile Try manually setting the path for your .env file using the settings mentioned in the document above. Then run the environment variable printer to check if the variable is detected. Also, if you post it in the community Slack, someone may comment on it if they have solved it in the past - |
When printing the env variables, my
Why does dbt core in the terminal work fine with these variables and the extension doesn't? What am I missing here? |
@anandgupta42 |
Up! I'm having the same issue! |
if vscode-dbt-power-user/dbt_core_integration.py Line 220 in 5735fa6
is joining In my case, I have
and this method is returning The value of
Finally, I don't see any references to Update: I can confirm that using full paths in my envvars, e.g.
|
Expected behavior
To use our dbt core we simply execute a source command that gets all the variables in our .env file of the workspace and it runs perfectly, the extension should use them too as described here in the docs of the extension.
Actual behavior
The extension doesn't pick up the variables in .env file and keeps returning the same error (image bellow).
Those env variables are necessary to find the profiles yml of our dbt project.
Steps To Reproduce
DBT_PROFILES_DIR
Bellow is my .env file as a .txt
env-example.txt
for example.
Log output/Screenshots
No response
Operating System
WSL for Windows
dbt version
1.7.18
dbt Adapter
BigQuery
dbt Power User version
0.51.2
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: