rjames
April 13, 2023, 8:09am
1
Hi,
how to assign value of environmental variable to variable in project yml file
eg.
vars:
database_source: “{{ env_var(‘DBT_DATA_LAKE_DB’) }}”
This doesn’t work. When I assign the value to model source it just returns the string value and not the value of the environment variable.
sources:
name: schemaname
database: “{{var(‘database_source’)}}”
the query is generated as {{ env_var(‘DBT_DATA_LAKE_DB’) }}.schemaname.tablename
Surya
April 17, 2023, 3:30am
2
i also tried the same, the variable is not holding the env var value.
Just wanna understand why you need to store the env var value in a variable as the value is stored in an environment variable and u can access the env variable directly.
rjames
April 25, 2023, 4:30pm
3
there is no use case for me. I’m just trying to understand if that’s a limitation. Thank you for checking.
system
Closed
May 2, 2023, 4:30pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.