Forum Discussion
In your example pipeline, the data being looked up is in a JSON Generator, where will it be coming from in your final pipeline? Is it a static file or pulled from a database? Unfortunately, the InMemoryLookup and Join snaps don’t operate on array elements. If the data you’re doing the lookups on is in a JSON file, you could import that file as an expression library and then use a Mapper with a Mapping Root and an expression like the following:
$.extend(lib.brands[$Brand])
That will create a new object with the fields from the original and the fields from the brand lookup table (i.e. TargetBrand).
Hi Tim,
Thanks for your response. The data in JSON generator will be from a file reader snap (which is a static file that gets refreshed every day) in the actual pipeline.
Just read about MappingRoot option, I will make an attempt, but not sure if that will be helpful as the conditional lookup we do in the actual pipeline has two more fields like sourcesystem and targetsystem which is not part of the array element.
I will also come up with the same pipeline in the approach which I mentioned using Router snap, JSON Split , in memorylookup, mapper, join and another mapper to get the desired output.
I felt that is not the right approach hence this query.
Thanks and regards,
Sri