Forum Discussion
@AleksandarAngelevski Thank you for your feedback. but this solution will not work as I have more than 1000 records to be compared. A ternary operator solution might not fit my scenario.
@patan What you want to say is that the Comparator object will contain more documents than it has right now (2)?
- patan3 years agoNew Contributor III
The Comparator object will have more documents to be compared than it has now.
- Aleksandar_A3 years agoContributor III
@patan Another approach that I can think of is to introduce separate Comparator Parameter in the child pipeline as following:
And in the child pipeline in the Mapper Snap use the following expression:
lib.arrayLib.getorgId($, JSON.parse(_comparator))
.Parent →
invoke-child-pipe-lib-with-170kb_2023_01_03.slp (7.5 KB)Child →
compare and get result from Expression Library_2023_01_03.slp (212.7 KB)Expression Library →
compareandfetchfilter_new.expr (148 Bytes)And this way you can exclude the Comparator object from the expression library.
Let me know if this approach is applicable in your scenario.
BR,
Aleksandar.- patan3 years agoNew Contributor III
@AleksandarAngelevski
Right now we are using the JSONGenerator snap with in the child pipeline but it is causing the performance issues.
I used another library which contains only comparator array, and pass it as pipeline parameter:
And used the expression library in the child pipeline to perform the compare as suggested by you. but the performance is still not improved.