cclaudio
5 years agoNew Contributor II
Issue with Arrays in Downstream Mappers after a Custom Snap Transformation
We built a custom snap that performs a transformation. You will notice in the output of the custom snap in the screenshot below that “medicalEnrollment” is a json array.
In a downstream mapper...
- 5 years ago
Thanks. I installed the binary snap pack and set a breakpoint in the Mapper to see the Java types used in the input, which is the output of your snap. I can see that medicalEnrollment is still a HashSet, not an ArrayList:
I haven’t studied your source code but I can see that you’re still using HashSet in a lot of places. Don’t use that type anywhere in your Document data. It’s not compatible with any of the JSON types. Use ArrayList everywhere you need an array.