Added quality-of-life feature to make model_type lookup case-insensitive in the model_audit macro #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small quality of life change that makes the lookup for the
model_type
key in theml_config
dictionary case insensitive.In the
dbt_ml.model_audit
macro, I observed that themodel_type
is inferred from theml_config
dictionary and is used to write some template information to the model audit table in BigQuery. However, the key'model_type'
is explicitly required to be lower case.This merge request primarily stems from an issue I encountered (see the discussion in #56) where if I used
"MODEL_TYPE": "ARIMA_PLUS"
in theml_config
dictionary I hit issues when using the post-hook:The case requirement is not immediately clear if one compares the
dbt_ml
syntax in the README to the BigQuery ML syntax guide.There are three paths to remedy this:
model_type
is supposed to be lower case.I do not have a preference. Please choose the path that you think is most sensible.
Please let me know if you require me to first create an issue and then link this merge request to an issue, I could not find any contribution guidelines.