Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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"}]}