Skip to content

Commit

Permalink
Merge pull request #36 from YotpoLtd/KOALA-872-disable-spaces-removal…
Browse files Browse the repository at this point in the history
…-on-measurements

do not remove spaces on measures sql
  • Loading branch information
dkruh1 authored Dec 31, 2023
2 parents e40afa9 + 5fc85a6 commit e91fec3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/yoda_dbt2looker/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}

Expand Down
2 changes: 1 addition & 1 deletion yoda_dbt2looker/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}


Expand Down

0 comments on commit e91fec3

Please sign in to comment.