Get events from Google Cloud Pub/Sub into Real-Time hub
This article describes how to add Google Cloud Pub/Sub as an event source in Fabric Real-Time hub. Google Pub/Sub is a messaging service that enables you to publish and subscribe to streams of events.
Prerequisites
- Access to a workspace in the Fabric capacity license mode (or) the Trial license mode with Contributor or higher permissions.
- A Google Cloud account with the Pub/Sub service enabled. Make sure you select a role with the required permissions.
Get connection information from Google Cloud Pub/Sub
Get the following information from Google Cloud:
- Project ID
- Subscription ID
- Service account key
Get the Project ID from the Google Cloud Console.
Get the Subscription ID from the Subscriptions page in Google Cloud Pub/Sub.
Get the Service account key.
In Google Cloud Console, select IAM & Admin.
Select Service Accounts on the left menu, and then select Create Service Account.
After configuring, give your role appropriate permission (Owner) and select Done.
Select your role, and select Manage keys in Actions.
Select Add Key and then select Create new key.
Download the JSON file and copy all the JSON content as the Service account key.
Note
The JSON file can be downloaded only once.
Data sources page
Sign in to Microsoft Fabric.
Select Real-Time on the left navigation bar.
On the Real-Time hub page, select + Data sources under Connect to on the left navigation menu. You can also get to the Data sources page from All data streams or My data streams pages by selecting the + Connect data source button in the top-right corner.
Add Google Cloud Pub/Sub as a source
On the Data sources page, select Google Cloud Pub/Sub.
On the Connect page, select New connection.
In the Connection settings section, specify the Project ID.
In the Connection credentials section, do these steps:
Select an existing connection or keep the default value: Create new connection.
For Subscription name, enter the name of the subscription you noted from Google Cloud Pub/Sub page.
For Service account key, enter the service account key you noted from the Google Cloud Console.
Select Connect.
On the Connect page, enter source name and topic name for the new source.
- Source name - Give a name this source.
- Topic name - It can be any string.
Select Next at the bottom of the page.
On the Review + connect page, review the summary, and select Create source.
View data stream details
- On the Review + connect page, if you select Open eventstream, the wizard opens the eventstream that it created for you with the selected Google Cloud Pub/Sub as a source. To close the wizard, select Close or X* in the top-right corner of the page.
- In Real-Time hub, select My data streams. To see the new data stream, refresh the page. For detailed steps, see View details of data streams in Fabric Real-Time hub.
Related content
To learn about consuming data streams, see the following articles: