Does anyone know how to use pyFlink to read and wr...
# troubleshooting
c
Does anyone know how to use pyFlink to read and write to a Kafka topic using a to schemas to write and a schema registry to read?
Anybody?
d
@Christos Hadjinikolis Hey, have you tried to read from(and write to) Kafka using Table API? Then you can refer to https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/connectors/table/formats/avro-confluent/ on how to using schema registry.
c
I really don’t understand how does this help 😞 .
There is no python code in the page
d
OK. Then you could take a look at this page [1] to get a basic understanding of PyFlink Table API. After reading it, you should know that it supports to create a
Table
via SQL DDL [2]. [3] shows how to define the SQL DDL to read Avro records registered in the Schema Registry as Kafka values: [1] https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/dev/python/table/intro_to_table_api/#intro-to-the-python-table-api [2] https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/dev/python/table/intro_to_table_api/#create-using-ddl-statements [3] https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/connectors/table/formats/avro-confluent/
c
I ll give it a try