Hi, I created a FlowFile with QueryDataBaseTable and want to convert this
straight to CSV via the ConvertRecord processor. I tried the AvroReader with
the following Schema Access Strategies

1. Use Embedded Avro Schema
2. Use 'Schema Text' Property and Schema Text set to ${avro.schema}

My FlowFile has the following start structure.
Obj^A^B^Vavro.schema<8a>^B{"type":"record","name":"customer_crm_summary","namespace":"any.data","fields":[{"name":"device_tac_code","type":["null","string"]}]}
I would think this seems all ok but the the AvroReader fails with the
Exception below SchemaNotFoundException
I tested this with Nifi 1.2 and 1.3 
Any ideas on what this could be? thanks

2017-08-04 14:41:45,236 ERROR [Timer-Driven Process Thread-1]
o.a.n.processors.standard.ConvertRecord
ConvertRecord[id=ab1cb1cb-015d-1000-4818-59412b1f3b2b] Failed to process
records for
StandardFlowFileRecord[uuid=6019524b-c23e-4b5f-977c-8be056aa217f,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1501814390874-1, container=default,
section=1], offset=0,
length=4090093],offset=0,name=7952490691251418,size=4089924]; will route to
failure: org.apache.nifi.schema.access.SchemaNotFoundException: FlowFile did
not contain appropriate attributes to determine Schema Text
org.apache.nifi.schema.access.SchemaNotFoundException: FlowFile did not
contain appropriate attributes to determine Schema Text
        at
org.apache.nifi.schema.access.AvroSchemaTextStrategy.getSchema(AvroSchemaTextStrategy.java:46)
        at
org.apache.nifi.serialization.SchemaRegistryService.getSchema(SchemaRegistryService.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89)
        at com.sun.proxy.$Proxy121.getSchema(Unknown Source)
        at
org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:106)
        at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
        at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1120)
        at
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
        at
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
        at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
2017-08-04 14:41:45,243 ERROR [Timer-Driven Process Thread-1]
o.a.n.processors.standard.ConvertRecord
ConvertRecord[id=ab1cb1cb-015d-1000-4818-59412b1f3b2b] Failed to process
records for
StandardFlowFileRecord[uuid=1414d8a0-c033-4d8d-b2a3-944c6124894f,cl






--
View this message in context: 
http://apache-nifi-developer-list.39713.n7.nabble.com/Avro-Reader-reading-from-FlowFile-throws-SchemaNotFoundException-tp16574.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Reply via email to