Skip to content
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

Support environment variables in compilation context for profile field #2230

Closed
drewbanin opened this issue Mar 23, 2020 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@drewbanin
Copy link
Contributor

Describe the bug

dbt v0.16.0 rationalized the compilation context for fields in the dbt_project.yml file. One key field, profile, is required to bootstrap the target variable which can then be used in other places in the dbt_project.yml compilation context.

It looks like 0.16.0 removed compilation of the profile field altogether. Can we instead compile this field as a jinja string with "base context" described here?

Steps To Reproduce

# dbt_project.yml

profile: "{{ env_var('DBT_PROFILE_NAME') }}"

### Alternatives
- Pass an env var in on the CLI:

dbt run --profile $DBT_PROFILE_NAME

  • Add a builtin env var, DBT_PROFILE_NAME that would override the profile if provided
@drewbanin drewbanin added the bug Something isn't working label Mar 23, 2020
@drewbanin drewbanin added this to the 0.16.1 milestone Mar 23, 2020
@drewbanin
Copy link
Contributor Author

Let's use the base context to compile the profile name string

beckjake added a commit that referenced this issue Apr 1, 2020
…ame-base-context

Render profile_name in the base context (#2230)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant