fix(chalice): fixed EE autocomplete top values (#3067)

fix(chalice): fixed funnels param
This commit is contained in:
Kraiem Taha Yassine 2025-02-25 18:22:51 +01:00 committed by GitHub
parent d4965f2137
commit 114bd4080b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 13 deletions

View file

@ -175,7 +175,7 @@ def get_simple_funnel(filter_d: schemas.CardSeriesFilterSchema, project: schemas
value_key=e_k
) if not specific_condition else specific_condition)
full_args = {"eventTypes": tuple(event_types), **full_args, **values}
full_args = {"eventTypes": event_types, **full_args, **values}
n_stages = len(n_stages_query)
if n_stages == 0:
return []

2
ee/api/.gitignore vendored
View file

@ -222,7 +222,7 @@ Pipfile.lock
/chalicelib/core/sessions/performance_event.py
/chalicelib/core/sessions/sessions_viewed.py
/chalicelib/core/sessions/unprocessed_sessions.py
/chalicelib/core/significance.py
/chalicelib/core/metrics/modules
/chalicelib/core/socket_ios.py
/chalicelib/core/sourcemaps.py
/chalicelib/core/sourcemaps_parser.py

View file

@ -266,16 +266,16 @@ def __search_metadata(project_id, value, key=None, source=None):
TYPE_TO_COLUMN = {
schemas.EventType.CLICK: "label",
schemas.EventType.INPUT: "label",
schemas.EventType.LOCATION: "url_path",
schemas.EventType.CUSTOM: "name",
schemas.FetchFilterType.FETCH_URL: "url_path",
schemas.GraphqlFilterType.GRAPHQL_NAME: "name",
schemas.EventType.STATE_ACTION: "name",
schemas.EventType.CLICK: "`$properties`.label",
schemas.EventType.INPUT: "`$properties`.label",
schemas.EventType.LOCATION: "`$properties`.url_path",
schemas.EventType.CUSTOM: "`$properties`.name",
schemas.FetchFilterType.FETCH_URL: "`$properties`.url_path",
schemas.GraphqlFilterType.GRAPHQL_NAME: "`$properties`.name",
schemas.EventType.STATE_ACTION: "`$properties`.name",
# For ERROR, sessions search is happening over name OR message,
# for simplicity top 10 is using name only
schemas.EventType.ERROR: "name",
schemas.EventType.ERROR: "`$properties`.name",
schemas.FilterType.USER_COUNTRY: "user_country",
schemas.FilterType.USER_CITY: "user_city",
schemas.FilterType.USER_STATE: "user_state",
@ -325,9 +325,9 @@ def get_top_values(project_id, event_type, event_key=None):
query = f"""WITH raw AS (SELECT DISTINCT {colname} AS c_value,
COUNT(1) OVER (PARTITION BY c_value) AS row_count,
COUNT(1) OVER () AS total_count
FROM experimental.events
FROM product_analytics.events
WHERE project_id = %(project_id)s
AND event_type = '{event_type}'
AND `$event_name` = '{event_type}'
AND isNotNull(c_value)
AND notEmpty(c_value)
ORDER BY row_count DESC

View file

@ -43,7 +43,7 @@ rm -rf ./chalicelib/core/sessions/sessions_search.py
rm -rf ./chalicelib/core/sessions/performance_event.py
rm -rf ./chalicelib/core/sessions/sessions_viewed.py
rm -rf ./chalicelib/core/sessions/unprocessed_sessions.py
rm -rf ./chalicelib/core/significance.py
rm -rf ./chalicelib/core/metrics/modules
rm -rf ./chalicelib/core/socket_ios.py
rm -rf ./chalicelib/core/sourcemaps.py
rm -rf ./chalicelib/core/sourcemaps_parser.py