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

[CT-2603] [Feature] CLI Should Support a Reading vars From YAML File #7709

Closed
3 tasks done
jeffquinn-blr opened this issue May 26, 2023 · 1 comment
Closed
3 tasks done
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@jeffquinn-blr
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

I would like to be able to run dbt run --vars-file my_variables.yml instead of having to pass a literal yaml encoded string as a command line argument.

In my personal case we have a project with multiple configuration sets that allow us to reuse the same DBT models for several clients. I would like to have the config set of each client in a directory, client_1_vars.yml, client_2_vars.yml, etc. and I would use scripting to pass the correct one at runtime.

Describe alternatives you've considered

The alternative is to have all our configuration sets encoded in dbt_project.yml underneath a dictionary keyed by project name, this will clause eventual file bloat of the dbt_project.yml file, and will be generally less clear.

Who will this benefit?

I think this would be of general use to anyone with more complex dbt projects that have different sets of configurations. Yaml strings as a command line arg are kind of awkward, and for any CLI I would argue its always good to have an option to pass params from a file or from command line args, as you never know which one will be more convenient for a given user at any time.

Are you interested in contributing this feature?

I'm willing and able to contribute this feature

Anything else?

No response

@jeffquinn-blr jeffquinn-blr added enhancement New feature or request triage labels May 26, 2023
@github-actions github-actions bot changed the title [Feature] CLI Should Support a Reading vars From YAML File [CT-2603] [Feature] CLI Should Support a Reading vars From YAML File May 26, 2023
@dbeatty10
Copy link
Contributor

Thanks for proposing this idea and sharing your use-case @jeffquinn-blr !

This is similar enough to #2955 that I'm going to close this one as a duplicate.

Would you be willing to read through that discussion and add your unique thoughts and ideas within #2955?

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2023
@dbeatty10 dbeatty10 added duplicate This issue or pull request already exists and removed triage labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants