You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Alexey Romanenko (Jira)" <ji...@apache.org> on 2019/11/21 16:24:00 UTC
[jira] [Commented] (BEAM-7336) KafkaIO should support inferring
schemas when reading Avro
[ https://issues.apache.org/jira/browse/BEAM-7336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979401#comment-16979401 ]
Alexey Romanenko commented on BEAM-7336:
----------------------------------------
One question about user API.
By default, {{KafkaIO.Read}} returns either {{PCollection<KafkaRecord<K, V>>}} or {{PCollection<KV<K, V>>}} as output. If we want to leverage inferring Avro schemas and use it, for example, for BeamSQL transform downstream, then we need to output {{PCollection<GenericRecord>}} (like in PubSubIO). However, in this case we lose Kafka key information which perhaps could be useful for user in some cases. I tend to keep key information and return either {{PCollection<KafkaRecord<K, GenericRecord>>}} or {{PCollection<KV<K, GenericRecord>>}} and then let user decide what to do with keys (use {{alues.create()}} or not) .
[~reuvenlax] What do you think?
> KafkaIO should support inferring schemas when reading Avro
> ----------------------------------------------------------
>
> Key: BEAM-7336
> URL: https://issues.apache.org/jira/browse/BEAM-7336
> Project: Beam
> Issue Type: Sub-task
> Components: io-java-kafka
> Reporter: Reuven Lax
> Assignee: Alexey Romanenko
> Priority: Major
>
> PubSubIO already supports this.
> It would also be nice to be able to look up Avro schemas in the Kafka schema registry.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)