dbt-setup-example
dbt-setup-example copied to clipboard
dbt cannot render {{ env_var('USERNAME') }}
Many thanks for the excellent example!
I seem to have an issue though when executing
dbt debug --profiles-dir .
I get the following error:
`Using dbt_project.yml file at /Users/
Configuration: profiles.yml file [ERROR invalid] dbt_project.yml file [OK found and valid]
Required dependencies:
- git [OK found]
1 check failed: Profile loading failed for the following reason: Runtime Error Compilation Error Could not render {{ env_var('USERNAME') }}: Env var required but not provided: 'USERNAME'`
I am able to overcome the error if I replace the env_var with the value of the environment variable or if I set a default value for the variable.
I have validated that the environment variable is set using echo.
Also, I think it would be useful to include .venv in your .gitignore file.
Many thanks for the support.
Achilleas
Thanks @avoutsas67! This repo is pretty seriously out of date at this point so I'm not surprised it doesn't work -- I think dbt has great guides for getting started so I'd follow one of those instead :)