exclude performance events from non-performance metrics/lists
This commit is contained in:
1 parent
88ccf5348e
commit
17e7a4a63a
16 files changed
+55
-8
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import clickhouse from '@/lib/clickhouse';
|
||||
import { DATA_TYPE } from '@/lib/constants';
|
||||
import { DATA_TYPE, EVENT_TYPE } from '@/lib/constants';
|
||||
import { CLICKHOUSE, PRISMA, runQuery } from '@/lib/db';
|
||||
import prisma from '@/lib/prisma';
|
||||
import type { EventDataSeriesPoint, PropertyFilter, QueryFilters } from '@/lib/types';
|
||||
@@ -50,6 +50,7 @@ async function relationalQuery(
|
||||
cross join lateral jsonb_array_elements_text(coalesce(session_data.string_value, '[]')::jsonb) as array_item(value)
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
and website_event.event_type != ${EVENT_TYPE.performance}
|
||||
and session_data.data_key = {{propertyName}}
|
||||
and session_data.data_type = ${DATA_TYPE.array}
|
||||
${filterQuery}
|
||||
@@ -86,6 +87,7 @@ async function clickhouseQuery(
|
||||
and session_data.website_id = {websiteId:UUID}
|
||||
where website_event.website_id = {websiteId:UUID}
|
||||
and website_event.created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and website_event.event_type != ${EVENT_TYPE.performance}
|
||||
and session_data.data_key = {propertyName:String}
|
||||
and session_data.data_type = ${DATA_TYPE.array}
|
||||
${filterQuery}
|
||||
|
||||
Reference in new issue
Block a user