Truncate Paths

Trim each path to the window between two anchor events (inclusive).

For each path, the first occurrence of start_event and the first occurrence of end_event that comes after it are found. Events outside this window are dropped. Paths that do not contain both anchors in the correct order are removed entirely.

Use start_event="path_start" / end_event="path_end" to refer to the actual first and last events of the path.

Usage

stream.truncate_paths(start_event="registration", end_event="purchase")
stream.truncate_paths(start_event="registration", end_event="path_end")

Parameters

ParameterTypeDescription
start_eventstrName of the event that marks the start of the window.
end_eventstrName of the event that marks the end of the window.
path_colstr, optionalPath ID column override; defaults to schema.path_col.
event_colstr, optionalEvent column override; defaults to schema.event_col.