Get events from Google Cloud Pub/Sub into Real-Time hub (preview)

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.

Note

Real-Time hub is currently in preview.

Prerequisites

  • Get access to the Fabric premium workspace with Contributor or above permissions.
  • A Google Cloud account with the Pub/Sub service enabled. Make sure you’ve selected 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
  1. Get the Project ID from the Google Cloud Console.

    Screenshot that shows Google Cloud Console that shows a project ID.

  2. Get the Subscription ID from the Subscriptions page in Google Cloud Pub/Sub.

    Screenshot that shows Google Cloud Pub/Sub page that shows a subscription ID.

  3. Get the Service account key.

    1. In Google Cloud Console, select IAM & Admin.

      Screenshot that shows  Google Cloud Console that shows the admin page.

    2. Select Service Accounts on the left menu, and then select Create Service Account.

      Screenshot that shows Google Cloud Console that shows the Create Service Account page.

    3. After configuring, give your role appropriate permission (Owner) and select Done.

      Screenshot that shows Google Cloud Console that shows the completion of creating the service account.

    4. Select your role, and select Manage keys in Actions.

      Screenshot that shows Google Cloud Console that shows the Manage keys button in Actions.

    5. Select Add Key and then select Create new key.

      Screenshot that shows Google Cloud Console that shows the selection of Create new key.

    6. Download the JSON file and copy all the JSON content as the Service account key.

      Note

      The JSON file can be downloaded only once.

Launch Add source experience

  1. Sign in to Microsoft Fabric.

  2. Select Real-Time hub on the left navigation bar.

  3. On the Real-Time hub page, select + Add source in the top-right corner of the page.

    Screenshot that shows how to launch Real-Time hub In Microsoft Fabric.

Add Google Cloud Pub/Sub as a source

  1. On the Select a data source screen, select Google Cloud Pub/Sub.

    Screenshot that shows the Select a data source page with Google Cloud Pub/Sub selected.

  2. On the Connect page, select New connection.

    Screenshot that shows the Connect page of the Add source wizard with the **New connection** link highlighted.

  3. In the Connection settings section, specify the Project ID.

    Screenshot that shows the Connection settings section of the New connection page.

  4. In the Connection credentials section, do these steps:

    1. Select an existing connection or keep the default value: Create new connection.

    2. For Subscription name, enter the name of the subscription you noted from Google Cloud Pub/Sub page.

    3. For Service account key, enter the service account key you noted from the Google Cloud Console.

    4. Select Connect.

      Screenshot that shows the Connection credentials section of the New connection page.

  5. 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.
  6. Select Next at the bottom of the page.

  7. On the Review and create page, review the summary, and select Create source.

View data stream details

  1. On the Review and create 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.
  2. In Real-Time hub, select All data streams. To see the new data stream, refresh the All data streams page. For detailed steps, see View details of data streams in Fabric Real-Time hub.

To learn about consuming data streams, see the following articles: