diff --git a/tests/resources/expected_lookml/views/ugc__shopper_experience_store_aggregation.view.lkml b/tests/resources/expected_lookml/views/ugc__shopper_experience_store_aggregation.view.lkml index 6c6326b..e44ea53 100644 --- a/tests/resources/expected_lookml/views/ugc__shopper_experience_store_aggregation.view.lkml +++ b/tests/resources/expected_lookml/views/ugc__shopper_experience_store_aggregation.view.lkml @@ -83,7 +83,7 @@ view: ugc__shopper_experience_store_aggregation { measure: engagement { description: "" type: number - sql: (SUM(${ugc__shopper_experience_store_aggregation.interacted_users} )/SUM( ${ugc__shopper_experience_store_aggregation.total_users})) ;; + sql: (SUM(${ugc__shopper_experience_store_aggregation.interacted_users} ) / SUM( ${ugc__shopper_experience_store_aggregation.total_users})) ;; } measure: count { diff --git a/tests/yoda_dbt2looker/test_generator.py b/tests/yoda_dbt2looker/test_generator.py index 51691fa..4e19746 100644 --- a/tests/yoda_dbt2looker/test_generator.py +++ b/tests/yoda_dbt2looker/test_generator.py @@ -366,7 +366,7 @@ def test_lookml_non_aggregative_measure(): assert value == { "name": "measure_1", "type": "number", - "sql": "(SUM(${model_2.interacted_users} )/SUM( ${model_1.total_users})", + "sql": "(SUM(${model_2.interacted_users} ) / SUM( ${model_1.total_users})", "description": "measure_description", } diff --git a/yoda_dbt2looker/generator.py b/yoda_dbt2looker/generator.py index 6f6c6cb..8627a9e 100644 --- a/yoda_dbt2looker/generator.py +++ b/yoda_dbt2looker/generator.py @@ -398,7 +398,7 @@ def lookml_non_aggregative_measure(measure: models.Dbt2LookerExploreMeasure): "name": measure.name, "description": measure.description, "type": measure.type.value, - "sql": _convert_all_refs_to_relation_name(measure.sql), + "sql": _convert_all_refs_to_relation_name(measure.sql , False), }