[Feature] Check `config` macros keys for validity, possible typos
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
### Current Behavior
If I'll write a model with an inline model config having typo in one of the keys, dbt will silently proceed without any warning on that.
I've made a typo in key `unique_key`, which made dbt inferring field as an empty value and thus always appending rows instead of updating existing:
```jinja
{{
config(
materialized = 'incremental',
incremental_strategy = 'merge',
unnnnique_key = ['id'] # here is the typo
)
}}
```
### Expected Behavior
I am unsure if it's intended to have custom keys in a model's config, but it would be nice to have at least warning or ideally exception on invalid config key. I can try to make a PR, if someone will kindly point me to the right place in the code to put this check.
### Steps To Reproduce
Just make a dbt model with the code
```sql
{{
config(
materialized = 'incremental',
incremental_strategy = 'merge',
unnnnique_key = ['id']
)
}}
select 1 as id
```
### Relevant log output
_No response_
### Environment
```markdown
- OS: MacOS 14.5
- Python: 3.12
- dbt: 1.7.14
- dbt-bigquery: 1.7.8
```
### Which database adapter are you using with dbt?
bigquery
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.