dbt-core
dbt-core copied to clipboard
[Feature] state:modified consider source column name changes as changes
Is this your first time submitting a feature request?
- [X] I have read the expectations for open source contributors
- [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
Currently it doesn't appear that changes to source column names is detected.
I'm suggesting we detect at least if the column names change.
We could just add a same_columns method in ParsedSourceDefinition
def same_columns(self, old: 'ParsedSourceDefinition') -> bool:
return sorted([c for c in old.columns]) == sorted([c for c in self.columns])
Describe alternatives you've considered
If more than name is required, might want to add a self.columns.same_contents method similar to self.config.same_contents.
Who will this benefit?
Maintainers trusting their CI Pipelines (maybe too much) when source columns change out from under them.
Are you interested in contributing this feature?
Yes