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

[Feature] Support setting database and schema with environment variables #33

Open
2 of 4 tasks
bretwalker opened this issue Feb 24, 2023 · 1 comment
Open
2 of 4 tasks
Labels
status:scoping Currently being scoped type:enhancement New functionality or enhancement

Comments

@bretwalker
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

Currently, source configurations for database and schema names can only be set through project variables, which are not very dynamic.

I would like to use the same dbt_project.yml across environments that have different source databases, but project vars are not Jinja rendered, like most other configuration sections. The only mechanism for overriding projects vars is with the --vars command line option. While this would work, I'd like to avoid it because it complicates calling dbt for developers and in our deployments. In addition, using env vars is already a pattern that's supported in setting the database value in sources, and so I'd like to be able to do the same with dbt_zendesk_source.

There's a lot of discussion about how to make vars more configurable on the dbt-core Githib, but nothing has been decided yet.

Describe alternatives you've considered

No response

Are you interested in contributing this feature?

  • Yes.
  • Yes, but I will need assistance and will schedule time during your office hours for guidance.
  • No.

Anything else?

No response

@bretwalker bretwalker added the enhancement New feature or request label Feb 24, 2023
@fivetran-joemarkiewicz fivetran-joemarkiewicz added type:enhancement New functionality or enhancement and removed enhancement New feature or request labels Feb 27, 2023
@fivetran-joemarkiewicz
Copy link
Contributor

Hi @bretwalker thanks so much for opening this feature request and for kicking off a valuable discussion around how to more easily use these packages across multiple environments.

I have been following the progressing discussion around the future of vars and have been very interested to see where this develops. I myself have never dabbled into the environment variable realm; however, your proposal to use them does seem quite convincing within the package. This could allow for more functionality across environments.

The only area I am curious about is if environment variables may be leveraged outside of dbt Cloud? I would want to ensure that adding environment variable configs to the project would not create errors for non dbt Cloud users. Do you know if there is an ability to leverage these env_var configs outside of dbt Cloud?

@fivetran-joemarkiewicz fivetran-joemarkiewicz added the status:scoping Currently being scoped label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:scoping Currently being scoped type:enhancement New functionality or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants