Forum Discussion
Hello neelamanikandan,
You can use the sl.ensureArray() function to ensure that the FeeReductionDetail field will always be an array.
Just place a Mapper before the Splitter with the following settings:
Expression: sl.ensureArray($FeeReduction.FeeReductionDetail)
Target Path: $FeeReduction.FeeReductionDetail
With Pass through turned on.
Let me know if this helps you.
Regards,
Aleksandar.
- koryknick2 years agoEmployee
Max - The simplest way that I can think to accomplish what you're asking for is to use a Gate snap with the default settings and rename the input view to "exchangeRates" as below:
A word of caution on the Gate snap with the default settings - this snap consumes all input into a single document, which may consume significant memory resources if processing a large volume of data.
Hope this helps!
- Max2 years agoNew Contributor II
koryknick- The gate snap worked in this use case. However, it is concerning that it may have resource issues if processing large data. The data set in this case is around 35K records. But we have a lot of cases this logic will need to be used and our datasets are huge. Is there a better way/more efficient way of doing this with big result sets?
- koryknick2 years agoEmployee
It depends on the use case. You can use the Structure or Mapper snaps to manipulate individual input JSON documents, or use Group By Fields or Gate snaps to accumulate JSON documents into arrays.
SnapLogic is well suited to work with large data sets, you just need to think about how it is being processed and whether or not you need to accumulate everything into large, nested JSON documents for your endpoint.