Edit Events
Rename and/or delete events in a single operation.
A convenience combination of rename_events and drop_events — useful when
one pass over the unique event list should both clean up names and remove
noise. At least one of rename or delete must be provided.
Usage
stream.edit_events(rename={"old_checkout": "checkout"}, delete=["system_ping"])
stream.edit_events(delete=["debug_event", "internal_event"])
How it works
Before: btn_clk → debug → purchase
stream.edit_events(rename={"btn_clk": "button_click"}, delete=["debug"])
After — renaming and deleting happen in the same pass, so you only walk the unique event list once:
button_click → purchase
Renaming an event to a name that already exists merges the two. Events absent
from rename are left alone; use drop_events
or rename_events when you only need one
of the two operations.
Parameters
| Parameter | Type | Description |
|---|---|---|
rename | dict, optional | Mapping of {old_name: new_name}. Events whose current name is a key are renamed to the corresponding value. |
delete | list of str, optional | Event names to remove from the eventstream entirely. |