Skip to content

Commit

Permalink
feat(hogql): implement include_recordings for funnel actors (#20503)
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr authored Feb 28, 2024
1 parent 08255db commit ecaccb4
Show file tree
Hide file tree
Showing 20 changed files with 2,227 additions and 465 deletions.
6 changes: 4 additions & 2 deletions frontend/src/scenes/funnels/funnelPersonsModalLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export const funnelPersonsModalLogic = kea<funnelPersonsModalLogicType>([
kind: NodeKind.InsightActorsQuery,
source: values.querySource!,
funnelStep: converted ? stepNo : -stepNo,
includeRecordings: true,
}
openPersonsModal({ title, query })
openPersonsModal({ title, query, additionalSelect: { matched_recordings: 'matched_recordings' } })
} else {
openPersonsModal({
url: generateBaselineConversionUrl(converted ? step.converted_people_url : step.dropped_people_url),
Expand Down Expand Up @@ -134,8 +135,9 @@ export const funnelPersonsModalLogic = kea<funnelPersonsModalLogicType>([
source: values.querySource!,
funnelStep: converted ? stepNo : -stepNo,
funnelStepBreakdown: series.breakdown_value,
includeRecordings: true,
}
openPersonsModal({ title, query })
openPersonsModal({ title, query, additionalSelect: { matched_recordings: 'matched_recordings' } })
} else {
openPersonsModal({
url: converted ? series.converted_people_url : series.dropped_people_url,
Expand Down
1 change: 1 addition & 0 deletions posthog/api/test/__snapshots__/test_query.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
events.elements_chain AS elements_chain,
toTimeZone(events.created_at, 'UTC') AS created_at,
events.`$session_id` AS `$session_id`,
events.`$window_id` AS `$window_id`,
events.`$group_0` AS `$group_0`,
events.`$group_1` AS `$group_1`,
events.`$group_2` AS `$group_2`,
Expand Down
1 change: 1 addition & 0 deletions posthog/hogql/database/schema/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class EventsTable(Table):
"elements_chain": StringDatabaseField(name="elements_chain"),
"created_at": DateTimeDatabaseField(name="created_at"),
"$session_id": StringDatabaseField(name="$session_id"),
"$window_id": StringDatabaseField(name="$window_id"),
# Lazy table that adds a join to the persons table
"pdi": LazyJoin(
from_field="distinct_id",
Expand Down
8 changes: 8 additions & 0 deletions posthog/hogql/database/test/__snapshots__/test_database.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"key": "$session_id",
"type": "string"
},
{
"key": "$window_id",
"type": "string"
},
{
"key": "pdi",
"type": "lazy_table",
Expand Down Expand Up @@ -801,6 +805,10 @@
"key": "$session_id",
"type": "string"
},
{
"key": "$window_id",
"type": "string"
},
{
"key": "pdi",
"type": "lazy_table",
Expand Down
Loading

0 comments on commit ecaccb4

Please sign in to comment.