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. The reserved names path_start / path_end are valid anchors, e.g. end_event="path_end" keeps everything after start_event.

Usage

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

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.