Skip to main content
Version: 0.0.98

ts_shape.eventlog.schema

Column-name constants and schema definitions for the ts-shape event log.

The canonical event-log uses OCEL 2.0 column names (ocel:*) with a few ts-shape-prefixed columns for fields that have no OCEL counterpart but are useful for downstream consumers (interval starts, durations, severity, etc.). XES column names (concept:name, time:timestamp, case:concept:name, lifecycle:transition, org:resource) are produced only by the flat exporter; they do not appear in the canonical schema.

Functions
NameDescription
register_object_typeRegister a custom OCEL object type so adapters can emit it.
is_known_object_typeCheck whether an OCEL object type is built in or has been registered.
empty_eventsReturn an empty events table with the canonical columns and dtypes.
empty_objectsReturn an empty objects table with the canonical columns and dtypes.
empty_relationsReturn an empty event-to-object relations table with the canonical columns and dtypes.
empty_o2oReturn an empty object-to-object relations table with the canonical columns and dtypes.
empty_object_changesReturn an empty object changes table with the canonical columns and dtypes.
validateRaise ValueError if the event log violates the canonical schema.

register_object_type​

functionsource
register_object_type(name: str) -> None

Register a custom OCEL object type so adapters can emit it.

is_known_object_type​

functionsource
is_known_object_type(name: str) -> bool

Check whether an OCEL object type is built in or has been registered.

Parameters
NameTypeDescriptionDefault
namestrObject type name to look up.required
Returns
TypeDescription
boolTrue if name is a known object type, otherwise False.

empty_events​

functionsource
empty_events() -> pd.DataFrame

Return an empty events table with the canonical columns and dtypes.

Returns
TypeDescription
DataFrameA zero-row DataFrame with the expected events schema.

empty_objects​

functionsource
empty_objects() -> pd.DataFrame

Return an empty objects table with the canonical columns and dtypes.

Returns
TypeDescription
DataFrameA zero-row DataFrame with the expected objects schema.

empty_relations​

functionsource
empty_relations() -> pd.DataFrame

Return an empty event-to-object relations table with the canonical columns and dtypes.

Returns
TypeDescription
DataFrameA zero-row DataFrame with the expected event-to-object relations schema.

empty_o2o​

functionsource
empty_o2o() -> pd.DataFrame

Return an empty object-to-object relations table with the canonical columns and dtypes.

Returns
TypeDescription
DataFrameA zero-row DataFrame with the expected object-to-object relations schema.

empty_object_changes​

functionsource
empty_object_changes() -> pd.DataFrame

Return an empty object changes table with the canonical columns and dtypes.

Returns
TypeDescription
DataFrameA zero-row DataFrame with the expected object changes schema.

validate​

functionsource
validate(eventlog: EventLog) -> None

Raise ValueError if the event log violates the canonical schema.