This is the join a feature store exists to get right, and doing it wrong is the most expensive mistake in applied ML: because the model looks better, not worse.
You have two frames:
events: columns entity_id, timestamp: the moments you need features forfeatures: columns entity_id, timestamp, value: a feature that changes over timeFor each event, attach the value of the feature as it was known at that moment: the most recent feature row for that entity with a timestamp less than or equal to the event's. If no such row exists, the value is NaN.
Return entity_id, timestamp, value, sorted by entity_id then timestamp.
The trap: a plain merge on entity_id attaches every feature value, including ones recorded after the event. Training on that produces a model with excellent offline metrics that fails on day one in production, because at serving time the future does not exist.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen