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] Pass config values to sources in dbt_project.yml #9990

Closed
3 tasks done
holly-evans opened this issue Apr 20, 2024 · 1 comment
Closed
3 tasks done

[Feature] Pass config values to sources in dbt_project.yml #9990

holly-evans opened this issue Apr 20, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@holly-evans
Copy link

holly-evans commented Apr 20, 2024

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

In the dbt_project.yml file you can pass specific config values to models based on the folder structure. This is extremely useful so that you are not forced to pass in the same value in individual file configs. This pattern however doesn't work for sources. A project.yml section that I would expect to work is as follows:

name: 'dbt'
version: '1.0.0'

config-version: 2

...

# This works
models:
  dbt:
    dir1:
      +tags:
        - fancy_tag1
      sub_dir1:
        +enabled: false
      sub_dir2:
        +materialized: ephemeral

    dir2:
      +tags:
        - fancy_tag2

# This doesn't cause an error but doesn't actually work
sources:
  dbt:
    dir1:
      +database:
        - database_1
      sub_dir1:
        +loaded_at_field: col_1
      sub_dir2:
        +description: Sub_dir2 sources live here

    dir2:
      +loader:
        - Kafka

Describe alternatives you've considered

Just specifying the config in each source schema file

Who will this benefit?

Presumably any dbt users who have sources in separate files but those sources share config elements.

Are you interested in contributing this feature?

Potentially? If you get me started on which classes to work on

Anything else?

This is a duplicate of #2542, but it's already closed (this is not implemented as far as I can tell).

@holly-evans holly-evans added enhancement New feature or request triage labels Apr 20, 2024
@dbeatty10
Copy link
Contributor

Thanks for reaching @holly-evans !

I'm going to close this as being a specific case of the outcomes described in #7157

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@dbeatty10 dbeatty10 added duplicate This issue or pull request already exists and removed triage labels Apr 25, 2024
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