Frankly, this is a bit hard to follow. You were talking about medicalEnrollment
and then suddenly switched to Benefit_Election_Data
halfway through that last reply. The content of each array looks similar but the surrounding content looks different. But let me focus on your new examples involving Benefit_Election_Data
.
Apologies for the confusion. I’ll try to replicate the data flow to make it clearer
- “Excel Structure” Custom Snap is transforming an excel file. “medicalEnrollment” Array is a part of the the output
- “ROOT” Mapper. Transforms the base root of the data. In here, “medicalEnrollment” is transformed to $Change_Benefits_Data.Benefit_Election_Data. We expect “Benefit_Election_Data” to be the array containing the information medicalEnrollment previously had.
- “BENEFIT ELECTION DATA” Mapper. Transforms the “Benefit_Election_Data”.
But does this happen consistently? Your first post seemed to show that sometimes it correctly shows as an array
rather than as an object
, at least when you were talking about medicalEnrollment
. Is the problem that the behavior is not consistent?
Correct, that this is the core issue of this post. In this pipeline, it’s consistently happening whenever a mapper is chained downstream after the custom snap. If I introduce a JSON formatter and JSON Parser right after the custom snap as shown in the original post, the downstream mapper consistently behaves as we expect it to and transforms the array. In the second screenshot of the original post, I tried to show expect vs. actual behavior.
Can you please post a screenshot of the Mapper that includes the Input Preview
panel at the bottom?
Below is the screenshot.
![]()
Let me ask you this: In your custom snap, what Java class are you using for the array? We typically use ArrayList.
We are using a HashSet. We will try converting to ArrayList and post an update tomorrow.