The Simplest Way to Make Azure Data Factory and Cloud SQL Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use azure data factory and cloud sql to move data across clouds. This pair lets your pipelines read and write database tables on a schedule. Data engineers often run into network walls and role confusion between these two platforms. A clear setup keeps data moving while keeping your security team happy. How azure data factory and cloud sql share data and logins Azure Data Factory runs jobs that pull or push rows over the network. Cloud SQL holds your relational tables in Google Cloud.

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 data factory and cloud sql to move data across clouds. This pair lets your pipelines read and write database tables on a schedule.

Data engineers often run into network walls and role confusion between these two platforms. A clear setup keeps data moving while keeping your security team happy.

How azure data factory and cloud sql share data and logins

Azure Data Factory runs jobs that pull or push rows over the network. Cloud SQL holds your relational tables in Google Cloud. To link them, the pipeline needs a network path and a database user.

Let us look at Cloud SQL for PostgreSQL as our core example. It is a managed service, so you cannot make true superuser accounts. Instead, the default postgres user belongs to a special role named cloudsqlsuperuser.

That default user starts with no password, so you must set one before logging in. It can make new roles, make databases, and log in. Still, it does not hold true superuser or replication attributes. A Google system account named cloudsqladmin owns the top privileges on the database. Customers cannot delete or change these system roles or users.

Your data pipeline should never log in with the default admin user. Instead, use the admin account to make a narrow user just for the pipeline. Give that new user read or write rights only on the tables it needs.

Common failure modes in cross-cloud data pipelines

The biggest mistake teams make is sharing one strong database login across many pipelines. When ten jobs use the same login, you cannot tell which job broke a table. If that password leaks, an attacker gets wide rights to your data.

Another trap is giving the pipeline user the cloudsqlsuperuser role to fix permission errors fast. That role can create extensions, event triggers, and replication users. A data pipeline moving daily sales rows never needs those broad powers.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged queries also hurt teams during audits. When a pipeline runs a bad query, you need to see who wrote it. Shared accounts hide the real person or specific job behind the database call.

Network setup is another frequent pain point between Azure and Google Cloud. Opening the database to all public IP addresses invites brute-force attacks. Teams should restrict network paths so only trusted runtime nodes can reach the database port.

Scoping database roles and network paths for pipelines

Start by listing every table your Azure Data Factory job needs to touch. Create a fresh database role in Cloud SQL for that single pipeline workload. Grant select rights for read jobs, or insert and update rights for write jobs.

Keep passwords and keys out of plain text pipeline definitions. Store secrets in a dedicated vault and rotate them on a set schedule. If a job only reads data, make sure its user cannot drop tables or change schemas.

Watch for personal data moving through your cross-cloud jobs. Tables often hold emails, phone numbers, card numbers, or national IDs. When lower environments pull production data, masking rewrites matched fields in results to lower risk.

Review your database logs every week to spot strange query patterns or failed logins. Tie each pipeline run to a distinct user name so logs stay easy to read. When you scope roles and lock down network paths, cross-cloud jobs run safely.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Should Azure Data Factory use the default postgres user in Cloud SQL?

No, the default postgres user has broad rights like creating roles and databases. Make a separate database user with access only to the target tables.

Can I give my pipeline user true superuser rights in Cloud SQL for PostgreSQL?

No, customers cannot create or use accounts with true superuser attributes in Cloud SQL. The platform reserves those top system rights for the managed cloudsqladmin account.

How do I protect sensitive fields when moving data between clouds?

Scope the pipeline role to skip sensitive columns whenever possible. You can also use data masking so queries rewrite emails, phone numbers, or card numbers in results.

The query runs. The emails stay hidden.