I am using PubSub to capture realtime data. Then using GCP Dataflow to stream the data into BigQuery. I am using Java for dataflow.
I want to try out the templates given in DataFlow. The process is: PubSub --> DataFlow --> BigQuery
Currently I am sending message in string format into PubSub (Using Python here). But the template in dataflow is only accepting JSON message. The python library is not allowing me to publish a JSON message. Can anyone suggest me a way publish a JSON message to PubSub so that I can use the dataflow template to do the Job.
json
module which can serialize a Python dictionary to a JSON string:json.dumps(python_dict)
. Is this what you need? – Andrew Nguonly