Member since
05-09-2019
4
Posts
0
Kudos Received
0
Solutions
05-15-2019
04:36 PM
Thank you so much Matt, this worked pretty well for me
... View more
05-10-2019
05:13 PM
Hey @Matt Burgess - Thank you so much for responding, it perfectly worked as I needed. I've a slight change in output of JSON array. Output JSON Array should always contain "color_*" attribute as "color" always. Below is the sample output that I'm looking for. Expected Output: { "lastName" : "cgLastName6", "gender" : "Male", "currentDate" : "20190509", "middleInitial" : "D", "address_2" : "fake addy 2", "mailingZipCode" : "55555", "provider_address_1" : "123 fake addy", "color_1" : "white", "color_2" : "", "color_3" : "black", "color_4" : "", "color_5" : "blue", "homeAddress" : "123 fake st", "primaryLanguage" : "", "country" : "us", "colorsLove" : [ { "color" : "white", "date" : "20190905" }, { "color" : "black", "date" : "20190905" }, { "color" : "blue", "date" : "20190905" }] }
... View more
05-10-2019
03:48 PM
I'm a newbie to Nifi and learning eventually. I'm looking to create a JSON array by utilizing 5 fields of 15 fields JSON request by using JoltTransformJSON processor. JSON array must ignore the fields if the value is null/empty. @Matt Burgess Input: { "lastName" : "cgLastName6", "gender" : "Male", "currentDate" : "20190509", "middleInitial" : "D", "address_2" : "fake addy 2", "mailingZipCode" : "55555", "provider_address_1" : "123 fake addy", "color_1" : "white", "color_2" : "", "color_3" : "black", "color_4" : "", "color_5" : "blue", "homeAddress" : "123 fake st", "primaryLanguage" : "", "country" : "us" } I'm trying to build JSON array of "color_* "attributes and current date parameter to followed by color. My output should consist of existing input + newly built JSON array which consists of 3 color as the color_2, color_4 are null. Expected Output: { "lastName" : "cgLastName6", "gender" : "Male", "currentDate" : "20190509", "middleInitial" : "D", "address_2" : "fake addy 2", "mailingZipCode" : "55555", "provider_address_1" : "123 fake addy", "color_1" : "white", "color_2" : "", "color_3" : "black", "color_4" : "", "color_5" : "blue", "homeAddress" : "123 fake st", "primaryLanguage" : "", "country" : "us", "colorsLove" : [ { "color_1" : "white", "date" : "20190905" }, { "color_3" : "black", "date" : "20190905" }, { "color_5" : "blue", "date" : "20190905" }] }
... View more
Labels:
- Labels:
-
Apache NiFi