* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed exp funnels group by users
This commit is contained in:
Kraiem Taha Yassine 2024-11-13 17:43:13 +01:00 committed by GitHub
parent 9dbae3bc92
commit 40b7aa1c78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,12 +25,6 @@ def get_simple_funnel(filter_d: schemas.CardSeriesFilterSchema, project: schemas
full_args["MAIN_EVENTS_TABLE"] = MAIN_EVENTS_TABLE
full_args["MAIN_SESSIONS_TABLE"] = MAIN_SESSIONS_TABLE
if metric_format == schemas.MetricExtendedFormatType.SESSION_COUNT:
group_by = 'e.session_id'
else:
constraints.append("isNotNull(s.user_id)")
group_by = 's.user_id'
n_stages_query = []
n_stages_query_not = []
event_types = []
@ -172,12 +166,18 @@ def get_simple_funnel(filter_d: schemas.CardSeriesFilterSchema, project: schemas
return []
extra_from = ""
if has_filters:
if has_filters or metric_format == schemas.MetricExtendedFormatType.USER_COUNT:
extra_from = f"INNER JOIN {MAIN_SESSIONS_TABLE} AS s ON (e.session_id=s.session_id)"
constraints += ["s.project_id = %(project_id)s",
"s.datetime >= toDateTime(%(startTimestamp)s/1000)",
"s.datetime <= toDateTime(%(endTimestamp)s/1000)"]
if metric_format == schemas.MetricExtendedFormatType.SESSION_COUNT:
group_by = 'e.session_id'
else:
constraints.append("isNotNull(s.user_id)")
group_by = 's.user_id'
if len(n_stages_query_not) > 0:
value_conditions_not_base = ["project_id = %(project_id)s",
"datetime >= toDateTime(%(startTimestamp)s/1000)",