CREATED
, PROCESSING
, IN_TRANSIT
, and DELIVERED
. A change data capture (CDC) stream capturing an orders table may emit change events containing different values for the order status.
But, from an analytics perspective, you may only interested in the most up-to-date version and state for each order. For example, consider writing a SQL query to retrieve orders that took more than two days for the delivery. To enable that, we need to merge all change events belonging to a particular order to its latest value.
Apache Pinot supports that by enabling upserts on a real-time table.
Pinot Version | 1.0.0 |
---|---|
Code | startreedata/pinot-recipes/full-upserts |
order_status
is for order_id
5 is now set to CANCELLED
.