How to add pubsub attribute along with message from Google Sink

677 Views Asked by At

I have implemented the architecture as per link https://towardsdatascience.com/bigquery-cloud-functions-how-to-run-your-queries-as-soon-as-a-new-google-analytics-table-is-17fbb62f8aaa

But while sending message from sink to pubsub, I want to add an attribute along with the message. Is there any feature available in sink to add an attribute in the pubsub through sink.

Thanks in advance.

1

There are 1 best solutions below

0
On

Try adding custom fields to your logs and then create a sink.

Custom fields are fields within log entries that you can specify to be included in the summary line. These fields are populated, and highlighted in blue, whenever they are available in your log entries.

enter image description here

When you've added a label then create a sink to pub/sub. I don't know if this will work in your use case but it's worh a shot.