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

Make check_column_name_contract case insensitive for pattern and datatype #167

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

samkessaram
Copy link
Contributor

@samkessaram samkessaram commented Nov 30, 2023

Make check_column_name_contract case insensitive for pattern and datatype. We use Snowflake and were finding that the check_column_name_contract hook wasn't working as expected with the following args:

[--pattern, "(is|has)_.*", --dtype, boolean]

What was happening was that the catalog.json file was uppercasing the column names and datatypes, so when dbt-checkpoint was comparing the catalog to the config, nothing was being caught. There are workarounds by adding additional hooks and using more extensive regexes, but this caused a headache and it seems like dbt-checkpoint should be able to handle this.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fb503fe) 98.45% compared to head (ed1c15c) 98.45%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #167   +/-   ##
=======================================
  Coverage   98.45%   98.45%           
=======================================
  Files          47       47           
  Lines        2330     2330           
  Branches      309      309           
=======================================
  Hits         2294     2294           
  Misses         21       21           
  Partials       15       15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BAntonellini
Copy link
Collaborator

Thank you for contributing @samkessaram

@BAntonellini BAntonellini merged commit 1b846ce into dbt-checkpoint:main Dec 21, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants