bigfunctions > export_to_pubsub
export_to_pubsub¶
Signature
export_to_pubsub(project, topic, data, attributes)
Description
Exports data
and attributes
to Pub/Sub topic
.
💡 For this to work,
749389685934-compute@developer.gserviceaccount.com
must have publish permission on your topic.
Examples
select bigfunctions.eu.export_to_pubsub('your-project', 'your_topic', 'Your message data', '{"attribute1": "value1", "attribute2": "value2"}')
select bigfunctions.us.export_to_pubsub('your-project', 'your_topic', 'Your message data', '{"attribute1": "value1", "attribute2": "value2"}')
select bigfunctions.europe_west1.export_to_pubsub('your-project', 'your_topic', 'Your message data', '{"attribute1": "value1", "attribute2": "value2"}')
+----------------------+
| published_message_id |
+----------------------+
| 1123432546 |
+----------------------+