Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Automatic Fix Functionality for Fixable Violations #436

Closed
glevineLeap opened this issue Feb 29, 2024 · 1 comment
Closed

Feature - Automatic Fix Functionality for Fixable Violations #436

glevineLeap opened this issue Feb 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@glevineLeap
Copy link

glevineLeap commented Feb 29, 2024

Describe the feature

Functionality to apply automatic fixes where possible in the style of sqlfluff fix or rubocop --autocorrect.

For example, Hard Coded References violations could be automatically resolved by querying the DAG for a relevant reference and replacing the hardcoded table name.

Describe alternatives you've considered

Implementing recommendations by hand.

Additional context

Who will this benefit?

Depending on the nature of the violations, this could expedite the process of having an existing dbt project conform to best practices. I'd like to implement a CI check but our project currently has 461 outstanding violations after running the evaluator for the first time, many of which I suspect are automatically fixable. If I could automatically resolve 50% of those, it would allow me to focus on more substantive project changes and get closer to implementing a CI check.

Are you interested in contributing this feature?

No

@glevineLeap glevineLeap added the enhancement New feature or request label Feb 29, 2024
@b-per
Copy link
Collaborator

b-per commented Mar 1, 2024

Hi! Thanks for opening the issue.

This package being a dbt package, we can't edit files. So the idea is interesting but won't be achievable with dbt_project_evaluator.

If you want to get your code automatically fixed you could check at third party libraries like SQLFluff that you already listed or dbt-checkpoint

@b-per b-per closed this as completed Mar 1, 2024
@b-per b-per closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants