Created on 05-19-2023 09:04 AM - edited 05-19-2023 11:36 AM
When parsing a json array with a json tree reader (in this case using convert record), I am presented with this error, this testing was done in Nifi Version 1.21.0. However this error never occurs in Version 1.18.0.
An example of json that fails in 1.21.0 that works in 1.18.0
[
{"a": [ {"b": [{}]}]},
{"a": [ {"b": []}]}
]
Created 05-19-2023 11:43 AM
Welcome to the community @ollyhank . I'm not an expert but I did find notes that version 1.2 included:
New or Improved Processors, Controller Services, and Reporting Tasks
Not sure if it is the issue here, but is something to consider while awaiting someone with more experience to reply.
Created 05-24-2023 07:30 AM
Hi @cjervis, thanks for offering a solution but that change was V1.2, our error only occurs in the difference between much later 1.18 -> 1.21.
Created 05-22-2023 09:38 AM
There were some changes in 1.20 to address better schema inference. See the references below for release notes for 1.20 and specifically the issue you are experiencing.
[NIFI-10956] - Schema Inference returns incorrect datatype for records where some arrays are empty
https://issues.apache.org/jira/browse/NIFI-10956
Created 05-24-2023 07:31 AM
Hi @ChuckE, yes i had seen that note before and imagine that they fixed a similar issue but didnt catch this specific case, i am posting an issue in Jira to hopefully find a fix.