diff --git a/README.md b/README.md index eea233f..a4f8d8e 100644 --- a/README.md +++ b/README.md @@ -274,6 +274,10 @@ dbt run-operation required_docs [--args "{'models': ''}" ``` **Note:** Run this command _after_ `dbt run`: only models that already exist in the warehouse can be validated for columns that are missing from the model `.yml`. +By default, column names are assumed to be lower case in the DBT documentation, +if this is not the case in your project, setting the variable +`convert_column_names_to_lower_case` to `false` in `dbt_project.yml` will +compare the column names in the case they appear. ## Contributions Feedback on this project is welcomed and encouraged. Please open an issue or diff --git a/macros/utils/required_docs/evaluate_required_docs.sql b/macros/utils/required_docs/evaluate_required_docs.sql index 383934c..f89f05b 100644 --- a/macros/utils/required_docs/evaluate_required_docs.sql +++ b/macros/utils/required_docs/evaluate_required_docs.sql @@ -28,7 +28,9 @@ {% for column in model_columns %} - {% set column = column | lower %} + {% if var("convert_column_names_to_lower_case", true) %} + {% set column = column | lower %} + {% endif %} {% if column in model.columns.keys() %}