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.
Try adding custom fields to your logs and then create a sink.
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.