From 4fe2c52e0497c5d804bcda105604d84a47d5381f Mon Sep 17 00:00:00 2001 From: Matt Garber Date: Thu, 8 Feb 2024 11:57:00 -0500 Subject: [PATCH] SQL linting fix --- cumulus_library/.sqlfluff | 2 +- .../template_sql/codeable_concept_denormalize.sql.jinja | 2 +- cumulus_library/template_sql/shared_macros/syntax.sql.jinja | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cumulus_library/.sqlfluff b/cumulus_library/.sqlfluff index 5288bf9c..460d1cc2 100644 --- a/cumulus_library/.sqlfluff +++ b/cumulus_library/.sqlfluff @@ -17,7 +17,7 @@ capitalisation_policy = upper [sqlfluff:templater:jinja] -load_macros_from_path = cumulus_library/studies/core/core_templates +load_macros_from_path = cumulus_library/template_sql/shared_macros,cumulus_library/studies/core/core_templates [sqlfluff:templater:jinja:context] code_systems = ["http://snomed.info/sct", "http://hl7.org/fhir/sid/icd-10-cm"] diff --git a/cumulus_library/template_sql/codeable_concept_denormalize.sql.jinja b/cumulus_library/template_sql/codeable_concept_denormalize.sql.jinja index 7af396e8..c56af74d 100644 --- a/cumulus_library/template_sql/codeable_concept_denormalize.sql.jinja +++ b/cumulus_library/template_sql/codeable_concept_denormalize.sql.jinja @@ -38,7 +38,7 @@ CREATE TABLE {{ target_table }} AS ( code, display FROM system_{{ column_name }}_{{ loop.index0 }} - {{syntax.union_delineate(loop)}} + {{ syntax.union_delineate(loop) }} {%- endfor %} ) {%- if filter_priority -%}, diff --git a/cumulus_library/template_sql/shared_macros/syntax.sql.jinja b/cumulus_library/template_sql/shared_macros/syntax.sql.jinja index d69ed5ae..979c7464 100644 --- a/cumulus_library/template_sql/shared_macros/syntax.sql.jinja +++ b/cumulus_library/template_sql/shared_macros/syntax.sql.jinja @@ -11,3 +11,5 @@ UNION {%- endif -%} {%- endmacro -%} + +