Hi Sparsh,
First let me rephrase your requirement to evaluate my understanding is correct. Based on your note, you are trying to do the following :
-
There's a nested attribute A on an entity.
Inside A there are three sub-attributes: A1, A2, A3.
-
A3 is a start date. Among all rows in the A collection, you want the row with the latest (max) A3.
-
From that latest row, take A1's value and copy it into a top-level simple attribute B on the entity.
-
Show B in the secondary label (of the main entity) in Reltio Hub.
-
Keep B always current: whenever the entity is created or updated, recompute from A and update B.
Assuming the understanding above is correct, you should think about the problem in two steps
- First you will need to make sure the nested object under the parent nest A, survives based on the maxValue of the start date attribute A3. This can be done by applying a set of survivorship strategies on the nested attribute and it's child attributes.
- Once the correct child attributes are identified, build a process to copy the value of A1 (based on max Start Date A3) to a simple attribute B. Here and integration build will be required using RIH or any other custom solution.
First let's talk about the survivorship apporach, to achive the goal of surviving the nested object based on the latest A3 value, you will need to apply the following survivorship strategies on the parent nest and the child attributes.
- For the parent nest (i.e. A), apply the MaxValue Survivorship strategy where, comparisonAttributeUri will be the URI of A3. You will see some examples for this in this documentation.
- For the child attribute A3 (Start Date) apply the MaxValue survivorship strategy.
- For the nested children A1 and A2, apply
OtherAttributeWinnerCrosswalk with primaryAttributeUri → A3
- For each of the strategies, based on your data and requirement, you might need to apply relevant fallback strategies as well.
The above survivorship strategy configuration will ensure that under the nested attribute A, only one object survives as OV where the start date field A3 is latest.
Now, for deriving the value of B, based on A.A1, I will recommend using event streaming. where you do the following:
- Configure event streaming so that ENTITY_CREATED, ENTITY_CHANGED events are published to a streaming queue/topic on entity create or update. Use snapshot as the event payload type, so that you get the relevant attribute values.
- Use an integration flow to capture the streaming event. This can be done using RIH or any other custom solution that can listen to a queue or topic.
- From the event payload, read the OV value of A1 from the nest A.
- Map the value of A.A1 to attribute B and then trigger another entities API (with Partial Override) to update the entity.
- **In certain cases, you might need to make another GET API call to get the latest operational values).
This will asynchornously update the value of B on entity creation or entity update. Please review and let me know if you have any questions.
------------------------------
Diparnab Dey
Technical Consultant
Reltio
Kolkata, West Bengal
------------------------------