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
| Parameter | Type | Description |
|---|---|---|
start_event | str | Name of the event that marks the start of the window. |
end_event | str | Name of the event that marks the end of the window. |
path_col | str, optional | Path ID column override; defaults to schema.path_col. |
event_col | str, optional | Event column override; defaults to schema.event_col. |