question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when using env vars in the dbt_project.yml

See original GitHub issue

Description

To Reproduce

  1. Use an env var in the dbt_project.yml Example
target-path: " {{env_var('DBT_TARGET_PATH', 'target')}}" 
  1. Connect project
  2. See error

DbtError: cannot read response from dbt, could nor read dbt artifact: /usr/app/dbt/{{env_var('DBT_TARGET_PATH', 'target')}}/manifest.json

App Version

0.166.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
owlascommented, Aug 16, 2022

@ZeRego we override the target field so your example would work fine now, is that the only problem or did you want to generically support env vars in the dbt_project.yml? https://github.com/lightdash/lightdash/issues/2770

0reactions
ZeRegocommented, Aug 11, 2022

@owlas @rephus haven’t we fixed this already ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] env_var does not work in an object under the vars ...
The values of vars , defined in dbt_project.yml , aren't rendered today. They have to be defined as static values. As such, dbt...
Read more >
env_var - dbt Developer Hub
The env_var function can be used to incorporate Environment Variables from the system into your dbt project. This env_var function can be ...
Read more >
DBT - environment variables and running dbt - Stack Overflow
var and env_var are two separate features of dbt. You can use var to access a variable you define in your dbt_project.yml file....
Read more >
dbt Guide - GitLab
Our dbt jobs use SNOWFLAKE_TRANSFORM_WAREHOUSE as the variable name to identify the warehouse. The environment variable can be set in the .bashrc or...
Read more >
Add dbt project variables & use them in models - YouTube
In this video I will walk through the two ways that dbt allows you to define variables - In the dbt_project. yml file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found