12-01-2023 11:20 AM - edited 12-01-2023 11:35 AM
Hello,
I have an array of objects that i need to simply add a key to. However, im not a able to find a way of doing this. attached are screen shots of the input and desired output. Any advise is much appreciated.
Input:
12-02-2023 05:26 AM
@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!
12-04-2023 06:22 AM - edited 12-04-2023 06:46 AM
@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?
12-04-2023 07:51 AM
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.