Created 02-15-2017 04:25 PM
When using the InferAvroschema component for a complex json file I get the following exception:
2017-02-15 16:00:28,124 ERROR [Timer-Driven Process Thread-2] o.a.nifi.processors.kite.InferAvroSchema InferAvroSchema Failed to infer Avro schema for StandardFlowFileRecord[uuid=,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=**, container=default, section=5], offset=0, length=1503821],offset=0,name=10_4.xml.1487174330411.json,size=1503821] due to org.apache.avro.SchemaParseException: Can't redefine: Facility.FacilitySet.CurrentAccount.CurrentAccounts: org.apache.avro.SchemaParseException: Can't redefine: Facility.FacilitySet.CurrentAccount.CurrentAccounts org.apache.avro.SchemaParseException: Can't redefine: Facility.FacilitySet.CurrentAccount.CurrentAccounts
The json file I'm using is a valid json (validated on the http://jsonlint.com/ website).
Anyone have encountered this issue before?
Regards,
Dawid
Created 02-15-2017 04:52 PM
You might want to remove the corporate name reference out of the log message there chief.
Created 02-15-2017 05:00 PM
@Dawid Glowacki Looking at the exception it seems you have nested record with the same name. Avro does not allow two records with the same name within schema. Try using the namespace to make sure the full record name unique to avoid this issue.
Created on 02-16-2017 08:00 AM - edited 08-19-2019 04:45 AM
When a different XML use, I'm encountering a different issue now - FlowFile Repository Failed to update.
Not sure if the InferAvroSchema is mature enough to process bigger json files?