The Simplest Way to Make Azure Synapse and Google Pub/Sub Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use azure synapse and google pub/sub to move live event streams into cloud data tables. Google Pub/Sub takes in fast messages, and Azure Synapse runs big queries on that data. This setup helps teams build reports from live user actions across both clouds. You can read event streams, clean the data, and store it for analysis. Many groups run apps on Google Cloud while keeping their main reports in Azure. Linking the two tools removes manual file transfers and slow batch jobs. Your analysts

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use azure synapse and google pub/sub to move live event streams into cloud data tables. Google Pub/Sub takes in fast messages, and Azure Synapse runs big queries on that data.

This setup helps teams build reports from live user actions across both clouds. You can read event streams, clean the data, and store it for analysis. Many groups run apps on Google Cloud while keeping their main reports in Azure. Linking the two tools removes manual file transfers and slow batch jobs. Your analysts get fresh numbers while your app teams keep their fast message queues.

How data and roles flow between azure synapse and google pub/sub

Data starts when an app sends an event message to a Google Pub/Sub topic. A worker job or data pipeline then pulls those messages from a subscription. That worker writes the raw records into Azure storage or straight into Synapse tables. Once the data lands, Synapse pools run SQL queries or Spark jobs on it.

To make this work, both clouds must trust the worker job. On the Google side, you set up a service account with a read role. That role lets the job pull messages and mark them as read. On the Azure side, you use a managed identity or service principal. You give that identity permission to write rows into your target Synapse tables.

Workload identity federation lets you link these two cloud identities without static keys. Azure issues a token, and Google checks that token before sending any message data. This setup keeps static key files out of your pipeline settings and code.

Common risks and how to scope roles and network paths

Many teams start by making one broad service account for all data jobs. They download a long-lived key file and paste it into several pipeline scripts. If that key leaks, anyone can read every topic in your Google project. Over time, no one knows which script or person ran a given read job.

Another big risk comes from wide permissions inside the data warehouse itself. When engineers debug broken pipelines, they often log in with shared admin accounts. Unlogged queries on raw staging tables can expose sensitive user fields by mistake. Those raw event payloads often hold emails, phone numbers, card numbers, or national IDs.

Azure RBAC + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix these risks by scoping every role to one task. Give each pipeline its own identity and limit it to one subscription. Set up table permissions in Synapse so jobs only write to staging schemas. Use data masking so queries rewrite emails and card numbers in query results.

Keeping cross-cloud pipelines fast and easy to audit

Network rules also play a big part in keeping cross-cloud pipelines safe. Use private links on the Azure side to keep warehouse traffic off public networks. Filter outbound calls from your worker nodes so they only reach Google APIs. Keep your batch sizes small so failed writes do not block the message queue.

Good logs help you spot slow queries and bad message formats right away. Track every read call on the subscription and every insert job in the warehouse. When you pair tight roles with clear logs, cross-cloud data flows stay safe.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How do we connect these two clouds without saved key files?

Use workload identity federation between your Google project and your Azure tenant. This lets your Azure job trade its local token for a short Google token.

What happens if a message fails to load into the warehouse?

Set up a dead-letter topic in Google Pub/Sub to catch failed messages. Your team can inspect the bad payloads there and replay them after fixing the bug.

How can we protect user fields inside raw event payloads?

Apply column rules and dynamic masking on your staging and reporting tables. Masking rewrites matched fields like phone numbers or national IDs in query results.

The query runs. The emails stay hidden.