I have a requirement to read AVRO messages from another GCP project's PubSub topic. I have earlier implemented Python Dataflow pipelines which read JSON messages from PubSub and write to BigQuery. But I am new to handling AVRO messages. I tried to lookup Python documentation for AVRO and it points me to this link https://avro.apache.org/docs/current/gettingstartedpython.html
In this link there are examples that read from files and write to files, but I don't think these functions will be useful to read from PubSub. I am using the below transform to read from PubSub where the output is a bytestring.
"Read from PubSub" >> beam.io.ReadFromPubSub(topic=TOPIC).with_output_types(bytes)
I need a way to read these bytes(AVRO format)