The forum has moved to a new location!

You can find the new forum here.

Start a new topic

add a multi-layer mapping transformer.

Sometimes, you are in a situation where you need to map data, based on a pointer in other data. For example. I have a json with. 


{

  "A" : "B"

},

{

  "B" : "C",

  "D: "E"

},


I want the value of whatever "A" is pointing to. So "A" -> "B" -> "C". I want to get "C". This scheme is quite common in databases, and sometimes it is represented in their API's. So it would be nice to have this option within a transformer as well. 

You can currently work around this by using several "Node, Transform nodes" and "Recursively copy to children" transformers, but this is not ideal. 

1 Comment

Hi Koen Schoute, 


Thank you for your feedback. We really appreciate it. 


We usually put the static mapping ({"B": "C", "D": "E"}) in the Alumio storage and set i.e., the "B" as the storage entity identifier. The content of the storage entity is "C". When we need to get the mapping of A, we use the Get an entity from a storage transformer and select the storage that contains the mapping. The Storage entity identifier field should be filled with &{A}, so it will fetch the content of storage entity with identifier "B" because &{A} is"B". The "C" will be mapped to any path defined in the Destination field.


We hope our explanation is clear to you. Feel free to let us know if you have any questions, or maybe if the storage approach doesn't work best for you.


Best regards,

Gugi Gustaman

Login or Signup to post a comment