Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

NiFi 1.2 with AvroSchemaRegistry - Adding Schema Fails

Super 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

@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

@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.

Super 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"}]}
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.