Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

NiFi 1.2 with AvroSchemaRegistry - Adding Schema Fails

avatar
Master Guru

I first tried my own schema, which was validated with AVRO Tools and was valid.

Then I tried the one from https://blogs.apache.org/nifi/ latest article

It will not accept it as valid. I copied the one from the blog and a few other valid schemas and none were accepted.

schemaerror.png

1 ACCEPTED SOLUTION

avatar

@Timothy Spann Try minifying the Avro schema source (i.e., removing all the spaces and newlines) or just all the leading spaces from each line. It should work then.

View solution in original post

2 REPLIES 2

avatar

@Timothy Spann Try minifying the Avro schema source (i.e., removing all the spaces and newlines) or just all the leading spaces from each line. It should work then.

avatar
Master Guru

Fixed by removing almost all spaces

Can't have empty lines, can't have line breaks, no spaces between array elements.

{"type":"record","namespace":"hortonworks.hdp.refapp.sensehat","name":"sensehat","fields":[{"name": "tempf", "type": "float"},{ "name": "cputemp", "type": "float"},{ "name": "pressure","type": "float"},{ "name": "host","type": "string"},{ "name": "pitch","type": "float"},{"name": "ipaddress","type": "string"},{"name": "temp","type": "float"},{ "name": "diskfree","type": "string"},{ "name": "yaw","type": "float" },{"name": "humidity","type": "float"},{"name": "memory","type": "float"},{"name": "y", "type": "float"},{"name": "x", "type": "float" },{"name": "z","type": "float"},{"name": "roll", "type": "float"}]}