On this page
Product event reference
Look up what a Trazadera Golden destination receives for each record change, clear and full re-delivery, and how product events are listed, revalidated and reported.
When an entity’s records change, Golden publishes a product event to each of the entity’s destinations. The event’s payload is what the destination receives. This page describes that payload, the events a clear or a full re-delivery produces, how an HTTP receiver’s answer is treated, the order a receiver can rely on, and the product events Golden keeps for each destination.
The delivered payload
A payload is the record as stored, with its business fields, _id, _source
and _metadata, after the destination’s optional transformation. Two
_metadata members say what happened:
_operationsays what happened to the record:insert,update,remove, orclear._operation_bucketsays which candidate-group operation caused the change:merge,disconnectorunmerge. Older events may carrysplit. It is absent on a plain write — an insert, an update or a delete. A delete’s API response reads differently; see Record metadata.
| Record | _operation_bucket | _operation |
|---|---|---|
| A plain write, a delete included | — | insert, update or remove |
| The survivor of a merge that is a new record, or that continues a record in history | merge | insert |
| The survivor of a merge that continues one of the merged live records | merge | update |
| A record a merge absorbed | merge | remove |
| The survivor an undo archived | unmerge | remove |
| The record a merge had continued, put back by its undo | unmerge, or merge when it was itself a merge survivor before | update |
| A record an undo restored | unmerge | insert |
| A record an undo restored that was itself a merge survivor | merge | insert |
| A record a disconnect changed | disconnect | update |
| A deleted record brought back by a restore | —, or merge when it is a merge survivor whose absorbed records are still in history | insert |
| A record an origin release changed | — | update, without the released pair |
| A live record restated by a full re-delivery | — | insert |
_operation_bucket names the operation of this write only. A plain write to a record that a
merge, disconnect or undo touched earlier carries no _operation_bucket; a survivor still lists what
it absorbed in _metadata._merged. split appears only on events queued before Golden 3.2.0.
A record a merge absorbed carries _metadata._merged_into with the survivor’s identifier.
_metadata._merged has one meaning everywhere: the records this record absorbed. On an absorbed
record’s remove it is that record’s own list — absent when it absorbed nothing — and never the
survivor; follow an absorbed record with _merged_into. _merged is absent, never null. A merge
survivor also carries _metadata._merge_id, the identifier of the merge that produced it; see
Record metadata.
_metadata._history is true exactly when the record was written to the table’s history.
Audit history in a payload
When the entity’s destination entry has audit on, the default, the payload
also carries _audit: the record’s audit events, oldest first, each with
user, instant, type, comment, records and changes. records lets a
receiver follow a merge from an absorbed record to its survivor and back. With
audit off, the payload carries no _audit. The API never returns _audit
with a record; read audit there through the
record audit endpoint.
A merge survivor’s MERGE audit element carries changes for the values it
stores; absorbed records’ elements do not gain those changes. A table load’s
cleaner also contributes its removals, ignored values and rewrite reasons to
the delivered audit, as an upsert already does. A full resend with an
undeclared column or ignored value can therefore produce an _audit element
for every row. The original received documents and processing steps stay
in Golden’s audit store and are never delivered to a destination.
A restored survivor reads merge
A restored record that was itself a merge survivor reads merge, not
unmerge, so that its own undo remains available. For example, merge M1 and M2
into S1, merge S1 and M3 into S2, then undo S2. S1 returns as a survivor with
_operation: insert, _operation_bucket: merge and _merged: [M1, M2] —
what it absorbed, never the survivor it was absorbed into. M3, which absorbed
nothing, is published as unmerge and insert.
A merge does not always create a new identifier. On a COLUMN or SCRIPT dataset the survivor can
continue one of the merged records, published as an update of a row the receiver already holds, or
an identity in history, published as an insert of an identifier the receiver was earlier told was
removed. To tell a restored survivor from a new merge’s survivor, compare _metadata._merge_id: a
restored survivor carries the identifier of the merge that produced it, which an earlier event
carried too; a new merge’s survivor carries a new one.
Members a transformation cannot remove
A destination transformation can reshape the payload, but _operation,
_operation_bucket, _merged, _merged_into, _history and _updated are always kept, so a
delete never reads as an insert. A transformation can drop _merge_id.
_merged_into is derived after the
transformation from the stored merge relation, so an absorbed record’s remove always names its survivor. When
the transformation fails, the event is stored as invalid for that destination
with a concise error, and its payload is
the record before the transformation; see Revalidate an event.
Clear events
A clear event tells a destination to leave its mirror of the table empty. Golden publishes one clear per destination when:
- an entity’s table is cleared with
PUT /api/tables/clear/{name}; - an entity is deleted with
DELETE /api/entities/{id}; and - an entity synchronization runs with
sinkMask: FULL, before it restates every live record.
PUT /api/entities/{entity}/clear is not one of them: it removes the entity’s
candidate groups, touches no record and publishes nothing; see
Clear an entity’s groups.
Clearing a table that belongs to no entity removes its queued events and publishes nothing. A table cannot be deleted while an entity uses it. Deleting it afterwards removes its queued events except clears, so the clear an entity’s deletion queued is still delivered when the table is deleted right after the entity.
{
"_metadata": {
"_operation": "clear",
"_updated": "<publication time>"
},
"_clear": {
"table": "sample_customer",
"entity": "sample-customer-entity",
"records": 378
}
}
A clear has no _id and no _source, and a destination transformation is not
applied to it. records is the number of records the table held; a clear is
sent even when it is 0, because it means “leave the mirror empty” whatever
the destination holds.
Before a clear is published, Golden removes the table’s queued events for that destination, pending and invalid alike: an invalid event revalidated after a clear would re-apply an old write. An entity’s deletion also discards its pending asynchronous writes. After a clear there is nothing of that table left to revalidate.
Full re-delivery rebuilds the mirror
A synchronization with sinkMask: FULL is a mirror rebuild. Each destination
receives one clear, then every live record as insert with no
_operation_bucket, all under the run’s single operation, the clear first.
Each record is read as it stands when it is published, so a write during the
rebuild is never followed by an older copy. Deleted records leave the mirror. A receiver
that does not implement the clear is not emptied: it receives every live record
again and keeps the ones Golden deleted.
How each destination applies a clear
| Destination | Effect |
|---|---|
| HTTP | Delivered like any event; the receiver branches on _metadata._operation. How each answer is treated is in HTTP delivery outcomes |
| Kafka | One message keyed by the table identifier; the consumer applies it |
| JDBC, physical deletes | Deletes every row of the destination table |
| JDBC, logical deletes | Marks every row remove through the operation column |
| Golden table | Empties the destination table |
A clear empties the whole destination; see Use an exclusive target.
Delivery headers
HTTP requests and Kafka messages carry these headers when the value is known:
| Header | Meaning |
|---|---|
Idempotency-Key (HTTP), golden-event-id (Kafka) | The product event’s identifier; stable across redelivery |
Golden-Operation-Id | The audited operation of the command that caused the event |
Golden-Operation-Sequence | The record’s position within that operation. A clear takes the operation’s next position; a table clear’s own clear is 1 |
A Kafka message is keyed by the record’s _id, and a clear by the table
identifier. JDBC and Golden-table destinations receive no headers. An event
with no recorded command, such as one queued before Golden 3.1.0,
carries only the event identifier.
HTTP delivery outcomes
Golden delivers a destination’s events one at a time, oldest first, and acts on the status code of the receiver’s answer. It does not read the response body to decide whether an event was delivered.
| Receiver’s answer | Effect |
|---|---|
Any 2xx | Delivered. The event is deleted, whatever the response body says |
401, 403, 408, 425 or 429; any 5xx; any 3xx; a timeout or a connection failure | Not delivered. The destination is held and the event is retried |
Any other 4xx, such as 400, 404, 409 or 422 | The event is marked invalid and not retried. The destination moves on to its next event |
Golden does not follow a redirect: a 3xx means the receiver is not at the
configured address, so the destination is held rather than the event lost.
While a destination is held, its later events wait. Golden retries the oldest
pending event after a back-off and delivers nothing behind it until that event
is delivered or marked invalid. With the default settings, the back-off starts
at 20 seconds and doubles after each failed attempt, up to 10 minutes; a
delivery resets it. A Retry-After header on a 401, 403, 408, 425,
429 or 5xx answer, in seconds or as an HTTP date, lengthens the next wait
to what it asks, up to that same 10-minute maximum; it never shortens a wait.
Each failed attempt counts on the event and records its reason in error, and
GET /api/events/stats reports the destination as stalled with its
nextCheck; see Recover tasks and deliveries.
Retries have no attempt limit: a credential the receiver no longer accepts
(401 or 403) holds the destination and every later event until the
destination’s credentials or the receiver are corrected.
An invalid event stays in the destination’s event list with the status and the
receiver’s answer in error. An administrator can queue it again; see
Revalidate an event.
Order and grouping
Each event describes itself. The events of one operation are not grouped: they can interleave with other writes, so a receiver must not rely on adjacency. The sequence can have gaps — an event a receiver refused or a transformation failed on stays undelivered, and a clear removes queued events — so it cannot tell a receiver that it holds a whole command.
Golden-Operation-Sequence orders the events of one operation. _updated
orders the writes of one record; it is not an ordering key across records.
The order of a merge’s and an undo’s events
A merge and an undo publish one event for the survivor and one for each other record, according to what the survivor is:
| Operation | Survivor continues a merged live record | Survivor continues an identity in history | New survivor |
|---|---|---|---|
| Merge | update of the survivor; a remove per absorbed record | insert of the survivor; a remove per merged record | insert of the survivor; a remove per absorbed record |
| Undo | update of the continued record, back to its state before the merge; an insert per absorbed record. No remove of the continued record | remove of the survivor; an insert per merged record | remove of the survivor; an insert per absorbed record |
A receiver that keys rows by _id must treat a continued survivor as the same row: it was never
removed.
The order is the same for every kind of survivor, and Golden-Operation-Sequence follows it: the
survivor’s event goes first — its insert, or its update when it continues a live record —
already carrying the provenance pairs of every record it absorbed, then each absorbed record’s
remove with _merged_into naming the survivor. An undo also publishes the survivor’s event first —
its remove, or the continued record’s update back — then an insert for each restored record.
A receiver keyed by provenance (_src and _src_id) must apply an absorbed record’s remove as
“this record moved to _merged_into”, never as “delete this pair”: deleting the pair would remove the
mapping the survivor’s event has just written.
Do not reorder these events by _updated: apply them in the order they arrive, or by the operation
sequence. A remove carries the time of the operation that removed the record, and the survivor’s
event the time of its write, so the two stamps are close but say nothing about their order.
Asynchronous entities publish the net effect
On an entity that indexes asynchronously, several writes to one record before indexing runs become one event, attributed to the last command that wrote the record. That event is the net effect of the writes:
| Writes before indexing | Event |
|---|---|
| Insert, then updates | insert with the final state |
| Insert, then delete | None |
| Updates, then delete | remove |
A receiver of an asynchronous entity sees what a synchronous entity would send, compressed. A full re-delivery’s clear does not discard these pending writes: they publish the current record after the rebuild.
Changes that publish nothing
- Ignoring, unignoring, escalating or resolving a bucket or cluster: it is a judgment about the group, not a change to a record.
- Clearing an entity’s candidate groups with
PUT /api/entities/{entity}/clear. - A disconnect repeated for records already separated. A disconnect publishes
updatewith_operation_bucket: disconnectonly for each record whose_metadata._unrelatedgrew, carrying the grown list. - A quality re-measurement: a definition change, the daily run, an on-demand measurement or a recalculation.
A payload’s _metadata._quality and qualityState are the quality as of
publication. Read current quality through the API; a full re-delivery
refreshes a mirror.
Product events in Golden
Golden keeps each destination’s events until they are delivered. Every events
operation and the Events screen require ADMIN. An event reports:
| Member | Meaning |
|---|---|
id, sink | The event and its destination |
entityId, tableId, recordId | What the event is about |
operation, bucketOperation | The payload’s _operation and _operation_bucket; bucketOperation is empty on a plain write, a delete included |
operationId, operationSequence | The command’s audited operation and the record’s position in it |
actorType, actorId | Who caused the change |
payload | What the destination receives. Treat it as customer data |
created, modified | When the event was stored and last changed |
valid, error, attempts | Whether delivery is still possible, the last refusal, and the delivery attempts made |
GET /api/events/sink/{id} lists one destination’s events in publication
order, oldest first. It accepts filter (ALL, the default, VALID or
INVALID) and, combined with it and with each other, entityId, tableId,
recordId, operation and operationId. operation ignores case; a value
other than insert, update, remove or clear is a 400. Page with
pageNumber and pageSize (default 10, at most 1000). Events queued
before Golden 3.1.0 can leave them empty, and a filter on them does
not match such events.
A refused delivery’s error is concise: the status, the receiver’s own words
(bounded), and each failure’s type and message. A stalled delivery and a
destination that cannot start also write their reason and count the attempt.
Revalidate an event
PUT /api/events/valid/{id} queues an invalid event again, at the end of the
queue.
| Event | Answer |
|---|---|
| Invalid | Queued again |
| Already valid | 409; the event stays where it is |
| A destination transformation failed on it | The transformation runs again and the result is queued. If it still fails, 409 with the new error and one more attempt |
On a JDBC or Golden-table destination, revalidation is protected by the destination’s stamp, within the limits described in JDBC destinations: in particular, after a physical delete an older update finds no row and brings the record back. Read what an invalid event would write before revalidating it.
For the screens and the recovery procedure, see Recover tasks and deliveries.