dbt-labs / dbt-labs/dbt-autofix

resolve redundancy of column keys from dbt yaml

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.