NIFI-751 Add Processor To Convert Avro Formats#70
NIFI-751 Add Processor To Convert Avro Formats#70jackowaya wants to merge 1 commit intoapache:developfrom
Conversation
|
Alan, Thanks for contributing! We'll work with you to get this promptly merged. Here are some findings of an initial review:
I realize this looks like a lot of stuff but it should be pretty easy to address and is a good first step. If you have any questions on it just let us know. Thanks |
There was a problem hiding this comment.
Should this check to see whether the outputSchema allows null?
|
Made many changes here, including I believe all of Joe's suggestions and the majority of Ryan's. A few little notes:
|
|
Alan - excellent and thanks! Do you mind providing a rebased/squashed commit? |
Implemented a new NiFi processor that allows avro records to be converted from one Avro schema to another. This supports.. * Flattening records using . notation like "parent.id" * Simple type conversions to String or base primitive types. * Specifying field renames using dynamic properties.
|
rebased to upstream/develop and squashed into one commit. |
|
@rdblue You might want to double check the CSV and JSON to Avro processors and add documentation to them like Alan has done here (additional documentation). Providing an example of usage could be a big help to folks. Also please verify whether your processor needs to accept the hadoop configuration. If not you can simply remove it from the properties being added. @jackowaya Great job! I've made a small change to remove the pulling in of the hadoop configuration property. |
|
i just want to add how easy this was to test. We're definitely going to build an avro viewer like we have for JSON, XML, etc.. because of this cool use case. I setup a 'generate flow file' and replace text to make some CSV lines then ran that into "Convert CSV to Avro" and a "ConvertAvroSchema" all using Alan's example schemas. And i didn't have it right at first because my id wasn't a long and my revenue wasn't a double. But that was obvious as it told me right in context. So i could just easily iterate and go. It is a good example of taking a cool project, Kite, and combining it with the power NiFi has to make these things interactive to quickly iterate and building something useful. Nice job Alan and Ryan! |
|
Hey @joewitt @jackowaya , somehow I dont see AvroRecordConverter in NiFi's available Processors. I need to be able to convert an incoming source file (CSV/XML/JSON) to a generic schema. However, the problem is I am not sure how to - 1. Convert a AVRO 'record' type to another and 2. When using ConvertAvroSchema how do we specify the dynamic properties as specified in the NiFi documentaion here - https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.kite.ConvertAvroSchema/index.html Please advice. Thank you. UPDATE - I see now that the AvroRecordConverter is instead used in ConvertAvroSchema.java, but the question remains as to how do we specify the dynamic properties via NiFi? |
This closes apache#70 Signed-off-by: Joseph Percivall <JPercivall@apache.org>
Implemented a new NiFi processor that allows avro records to be converted from one Avro schema
to another. This supports..