Skip to content

Commit

Permalink
bug(DVPN-178): VPN event funnel not showing - quick fix (#497)
Browse files Browse the repository at this point in the history
* reformatted SQL for event_types

* implemented changes suggested by @sean-rose in PR#496

* only run escape_metachars() when property_name or property_value filter is set
  • Loading branch information
kik-kik authored Aug 8, 2022
1 parent 6f33984 commit 9073f59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion generator/views/funnel_analysis_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ def _event_types_lookml(self) -> List[Dict[str, Any]]:
SELECT
mozfun.event_analysis.aggregate_match_strings(
ARRAY_AGG(
CONCAT(
DISTINCT CONCAT(
{{% if _filters['property_name'] or _filters['property_value'] -%}}
COALESCE(mozfun.event_analysis.escape_metachars(property_value.value), ''),
{{% endif -%}}
mozfun.event_analysis.event_index_to_match_string(et.index)
)
)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_funnel_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ def test_view_lookml(funnel_analysis_view):
SELECT
mozfun.event_analysis.aggregate_match_strings(
ARRAY_AGG(
CONCAT(
DISTINCT CONCAT(
{% if _filters['property_name'] or _filters['property_value'] -%}
COALESCE(mozfun.event_analysis.escape_metachars(property_value.value), ''),
{% endif -%}
mozfun.event_analysis.event_index_to_match_string(et.index)
)
)
Expand Down

0 comments on commit 9073f59

Please sign in to comment.