Hi Dave, The underlying internal “record format” is not JSON. Avro [1] is used to describe schemas across all record formats, but the internal data storage is NiFi specific. You may be interested in these articles by Mark Payne and Bryan Bende [2][3][4] and the potential use of the ScriptedReader [5] or ScriptedRecordSetWriter [6] to prototype your needed conversions.
[1] https://avro.apache.org/ <https://avro.apache.org/> [2] https://blogs.apache.org/nifi/entry/record-oriented-data-with-nifi <https://blogs.apache.org/nifi/entry/record-oriented-data-with-nifi> [3] https://blogs.apache.org/nifi/entry/real-time-sql-on-event <https://blogs.apache.org/nifi/entry/real-time-sql-on-event> [4] https://bryanbende.com/development/2017/06/20/apache-nifi-records-and-schema-registries <https://bryanbende.com/development/2017/06/20/apache-nifi-records-and-schema-registries> [5] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-scripting-nar/1.11.4/org.apache.nifi.record.script.ScriptedReader/index.html [6] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-scripting-nar/1.11.4/org.apache.nifi.record.script.ScriptedRecordSetWriter/index.html Andy LoPresto [email protected] [email protected] He/Him PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > On Apr 21, 2020, at 6:01 AM, DAVID SMITH <[email protected]> > wrote: > > Hi > I want to use the ConvertRecord Processor with it's underlying Record Readers > and Writers to convert files from XML or JSON to a bespoke format and > probably vice versa.I have looked at the Readers/Writers currently provided > and decided that I can use the XML/JSON ones provided but I will need to > write something for the bespoke format. So I started looking at the current > source code for the Readers/Writers to see how they work and what I would > need to do. When running the unit tests on the XMLReader I notice on the > console that the output is in JSON format.My question is, is JSON the common > format that all records are converted to and from? > Also is there any specific documentation on writing Reader/Writers, I have > only found the developers guide? > Many thanksDave >
