Forum Discussion
That is happening because the output of the Union Snap will produce multiple documents(from both inputs). And some of the documents does not contains the value that you are referring to, which throws an error.
By checking the “null safe acess” in the mapper snap will prevent the error, and on the output of the mapper snap you will have the same number of documents as input. The documents that does not contains the path that you are referring will have “null” value on output.
BR,
Spiro Taleski
adam_gataev - you have the right terminology. Just use a Mapper as follows:
Here I'm just using two Array methods: concat() and pop() to complete your goal in one expression. The Array.pop() removes the last element and returns that element. The Array.concat() creates a new array with the new element added in.
Note that I'm also using the "pass-through" option on the Mapper settings. This allows any other elements in the input doc to flow through to the target path without specifying them.
Hope this helps!
- adam_gataev3 months agoNew Contributor II
You're the man koryknick, thank you so much!
Related Content
- 3 years ago