[ 
https://issues.apache.org/jira/browse/BEAM-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190169#comment-16190169
 ] 

Eugene Kirpichov commented on BEAM-2993:
----------------------------------------

(I replied in email and it didn't get posted here, so copying...)

How do you set the coder on your collections of GenericRecord? My claim is that 
it's impossible to create a PCollection of GenericRecord without knowing its 
schema => you actually have the schema => I'm not sure why you can't just pass 
it to write(). What am I missing? Are you perhaps using a different coder for 
GenericRecord, eg are you encoding the full schema with every record? I guess 
this will become more clear if I look at the PR.

> AvroIO.write without specifying a schema
> ----------------------------------------
>
>                 Key: BEAM-2993
>                 URL: https://issues.apache.org/jira/browse/BEAM-2993
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-extensions
>            Reporter: Etienne Chauchot
>            Assignee: Etienne Chauchot
>
> Similarly to https://issues.apache.org/jira/browse/BEAM-2677, we should be 
> able to write to avro files using {{AvroIO}} without specifying a schema at 
> build time. Consider the following use case: a user has a 
> {{PCollection<GenericRecord>}}  but the schema is only known while running 
> the pipeline.  {{AvroIO.writeGenericRecords}} needs the schema, but the 
> schema is already available in {{GenericRecord}}. We should be able to call 
> {{AvroIO.writeGenericRecords()}} with no schema.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to