Member since
03-11-2025
1
Post
0
Kudos Received
0
Solutions
03-11-2025
07:59 AM
Hi, I have a similar issue. When I use "Advanced" to check what output nifi would provide, I get the output there, but when I check the queue after the JoltTransformJSON has processed the output, it says null. I changed "Jolt Transform DSL" from "chain" to "default", as it eliminated the space that was there between the square brackets and the array elements in an array. This is my Jolt specification - [ { "operation": "shift", "spec": { "uid": "uid", "location_name": "name", "location_city": "city", "age_min": "age_min", "age_max": "age_max", "firstdate_begin": "begin", "lastdate_end": "end", "location_coordinates": { "lon": "location[0]", "lat": "location[1]" } } } ] and this is the expected output - { "uid": "54570223", "name": "Théâtre Plaza", "city": "Montréal", "age_min": null, "age_max": null, "begin": "2024-03-23T23:30:00+00:00", "end": "2024-03-24T01:00:00+00:00", "location": [ -73.603196, 45.536315 ] } EDIT - I edited my jolt specification, and it looks like this now- [ { "operation": "shift", "spec": { "*": { "uid": "uid", "location_name": "location_name", "location_city": "location_city", "age_min": "age_min", "age_max": "age_max", "firstdate_begin": "firstdate_begin", "lastdate_end": "lastdate_end", "location_coordinates": { "lon": "location[0]", "lat": "location[1]" } } } } ] I am getting the desired output - { "uid": "70029814", "location_name": "Sanctuaire du Saint-Sacrement", "location_city": "Montreal", "age_min": null, "age_max": null, "firstdate_begin": "2019-04-13T18:00:00+00:00", "lastdate_end": "2019-04-14T10:00:00+00:00", "location": [-73.581721, 45.525243] } But the issue now is that after processing, the output looks something like this - { "uid" : [ "54570223" ], "location_name" : [ "Théâtre Plaza" ], "location_city" : [ "Montréal" ], "age_min" : [ 16 ], "age_max" : [ 99 ], "firstdate_begin" : [ "2024-03-23T23:30:00+00:00" ], "lastdate_end" : [ "2024-03-24T01:00:00+00:00" ], "location" : [ [ -73.603196 ], [ 45.536315 ] ] } Working on keeping only the location as arrays. 😅😅😅
... View more