dbt-labs / dbt-labs/dbt-autofix
resolve redundancy of column keys from dbt yaml
- Dominant language
- Python
- Stars
- 88
- Forks
- 19
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Description
related: https://github.com/dbt-labs/internal-analytics/pull/3992
`preview.94` ([docs](https://github.com/dbt-labs/fs/blob/main/CHANGELOG.md#:~:text=%5Bdbt%2Dfusion%5D%20Deduplicate%20column%20definitions%20during%20the%20initial%20stages%20of%20processing%20columns%20to%20match%20dbt%20core%20behavior)) is now conformant with dbt Core in that:
- if there is model with duplicate column keys
- only the last definition will be used
accordingly, there's `parse` will throw a warning when this is the case like the below.
```
warning: dbt1033: Column 'initial_catch_up_date' is defined multiple times in 'models/staging/googlesheets/stg_googlesheets__rev_schedule_overrides.sql'. Only the last definition will be used.
```
dbt-autofix should fix this where possible.
one catch that might make this a 'manual fix'
> how to automatically pick which column config is the correct one?
Contributor guide
Assessment
This issue has not been assessed yet.