Google Pub/Sub Setup Guide In Dev
Follow our setup guide to connect Google Pub/Sub to Fivetran.
Prerequisites
To connect Google Pub/Sub you need the following:
- Account in Google Cloud
- Existing Pub/Sub topic
- A service account with the following permissions:
pubsub.subscriptions.consumeto read messages (included in Pub/Sub Subscriber)pubsub.snapshots.create,pubsub.snapshots.seek, andpubsub.snapshots.deleteto resume from the last saved position after a failed sync (included in Pub/Sub Editor and Pub/Sub Admin)
Setup instructions
Find project ID
- Login to Google Cloud
- Click on Project name and find ID of project
Find subscription ID
- Open Pub/Sub topics list in Google Cloud
- Open topic which you want to connect
- In subscriptions tab create new subscription or find ID of existing subscription
Create service account key
- Open Service Accounts in Google Cloud
- Create new service account or select existing one
- Open Keys tab
- Click Add Key -> Create new key
- Select JSON type and click Create
- Key will be downloaded
Add principal to subscription
- Open subscription
- In permissions tab click on Add principal
- In principals use email of your service account
- In roles select Pub/Sub -> Pub/Sub Editor
- Click Save.
Snapshots are project-level resources. Grant Pub/Sub Editor, or a custom role with the snapshot permissions, on the Google Cloud project that contains your subscription. A subscription-level grant doesn't cover them.