[ 
https://issues.apache.org/jira/browse/NIFI-13630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien G. updated NIFI-13630:
-----------------------------
    Attachment: schema.avsc

> Avro MAP type doesn't work with the PutBigQuery processor
> ---------------------------------------------------------
>
>                 Key: NIFI-13630
>                 URL: https://issues.apache.org/jira/browse/NIFI-13630
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Julien G.
>            Priority: Major
>         Attachments: schema.avsc
>
>
> When writing a record with the map to BigQuery using the PutBigQuery 
> processor. The processor fails to generate the Proto message with the 
> following error. You can find the avro schema and the BigQuery schema 
> attached to the issue.
> {code:java}
> 2024-08-05 14:51:23,493 ERROR [Timer-Driven Process Thread-10] 
> o.a.n.p.gcp.bigquery.PutBigQuery 
> PutBigQuery[id=f5225062-a703-1f89-ffff-ffffea37b541] Stream processing failed
> java.lang.ClassCastException: class java.util.HashMap cannot be cast to class 
> java.util.Collection (java.util.HashMap and java.util.Collection are in 
> module java.base of loader 'bootstrap')                        at 
> org.apache.nifi.processors.gcp.bigquery.proto.ProtoUtils.createMessage(ProtoUtils.java:49)
>                                                                               
>                                       at 
> org.apache.nifi.processors.gcp.bigquery.proto.ProtoUtils.createMessage(ProtoUtils.java:52)
>                                                                               
>                                       at 
> org.apache.nifi.processors.gcp.bigquery.PutBigQuery.recordToProtoMessage(PutBigQuery.java:289)
>                                                                               
>                                   at 
> org.apache.nifi.processors.gcp.bigquery.PutBigQuery.writeRecordsToStream(PutBigQuery.java:263)
>                                                                               
>                                   at 
> org.apache.nifi.processors.gcp.bigquery.PutBigQuery.onTrigger(PutBigQuery.java:247)
>                                                                               
>                                              at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>                                                                               
>                                                 at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1361)
>                                                                               
>                                      at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:247)
>                                                                               
>                                                at 
> org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)
>                                                                       at 
> org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)                  
>                                                                               
>                                                   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
>                                                                               
>                                                   at 
> java.base/java.util.concurrent.FutureTask.run(Unknown Source)
>     at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
>  Source)                                                                      
>                                       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)   
>                                                                               
>                                                   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>     at java.base/java.lang.Thread.run(Unknown Source)    
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to