in processing-pipelines/bigquery/chart-creator/python/app.py [0:0]
def read_event_data(cloud_event):
# Assume custom event by default
event_data = cloud_event.data
type = cloud_event['type']
if type == 'google.cloud.pubsub.topic.v1.messagePublished':
message = event_data['message']
data = message['data']
decoded = base64.b64decode(data)
event_data = json.loads(decoded)
return event_data['country'], event_data['tableId']