[CT-3563] [source] configuration of "database" in dbt_project.yml or source.yml
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this your first time submitting a feature request?
- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
### Describe the feature
I want to configure the database for all sources in the "models" directory.
This works:
```
-- sources.yml
sources:
my_source:
+database: my_database_prod
```
This doesn't:
```
-- dbt_project.yml
sources:
my_dbt_project:
models:
+database: my_database_prod
```
error:
```
[WARNING] Configuration paths exist in you dbt_pproject.yml which do not apply to resources.
There are 1 unused configuration paths:
- sources.my_dbt_project.models
```
### Describe alternatives you've considered
configuring all source files individually.
### Who will this benefit?
Users who:
- use separate databases for separate target environments.
- want to save $ but not copying source data from prod to other environments OR
- do not have permission to copy source data from prod to other environments
### Are you interested in contributing this feature?
if it's easy and I can understand how to test it
### Anything else?
Testing was the hard part last time I tried to contribute
Contributor guide
Assessment
This issue has not been assessed yet.