Skip to content

Commit a805949

Browse files
Feature - Allow conversion of column names to lower case to be configured (#22)
* Update README.md * Update evaluate_required_docs.sql * Update macros/utils/required_docs/evaluate_required_docs.sql Co-authored-by: Teghan Nightengale <[email protected]>
1 parent 9d7279b commit a805949

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ dbt run-operation required_docs [--args "{'models': '<space_delimited_models>'}"
274274
```
275275
**Note:** Run this command _after_ `dbt run`: only models that already exist in
276276
the warehouse can be validated for columns that are missing from the model `.yml`.
277+
By default, column names are assumed to be lower case in the DBT documentation,
278+
if this is not the case in your project, setting the variable
279+
`convert_column_names_to_lower_case` to `false` in `dbt_project.yml` will
280+
compare the column names in the case they appear.
277281

278282
## Contributions
279283
Feedback on this project is welcomed and encouraged. Please open an issue or

macros/utils/required_docs/evaluate_required_docs.sql

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
{% for column in model_columns %}
3030

31-
{% set column = column | lower %}
31+
{% if var("convert_column_names_to_lower_case", true) %}
32+
{% set column = column | lower %}
33+
{% endif %}
3234

3335
{% if column in model.columns.keys() %}
3436

0 commit comments

Comments
 (0)