Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi 1.2 with AvroSchemaRegistry - Adding Schema Fails

Solved Go to solution

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

Accepted Solutions

Re: NiFi 1.2 with AvroSchemaRegistry - Adding Schema Fails

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

2 REPLIES 2

Re: NiFi 1.2 with AvroSchemaRegistry - Adding Schema Fails

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

Re: NiFi 1.2 with AvroSchemaRegistry - Adding Schema Fails

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"}]}
Don't have an account?
Coming from Hortonworks? Activate your account here