How to Integrate Fivetran and PlanetScale Safely

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair fivetran and planetscale in production to sync transactional database changes into analytics tables. This pipeline reads operational rows and writes them into a central warehouse for reporting. Setting up this link requires careful choices around keys, roles, and network rules. A safe setup protects live customer data while keeping analytics fresh for the business. How fivetran and planetscale share data and permissions PlanetScale runs on a distributed database engine that tracks

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 pair fivetran and planetscale in production to sync transactional database changes into analytics tables. This pipeline reads operational rows and writes them into a central warehouse for reporting.

Setting up this link requires careful choices around keys, roles, and network rules. A safe setup protects live customer data while keeping analytics fresh for the business.

How fivetran and planetscale share data and permissions

PlanetScale runs on a distributed database engine that tracks row updates through change streams. Fivetran connects to the database branch and reads those streams to capture new data.

First, the sync job runs a full read of the chosen tables. After that initial load, the job pulls only new inserts, updates, and deletes.

You set up a dedicated password in PlanetScale for the sync service to log in. This credential ties to a specific database branch and holds read permissions on target tables.

Data flows over encrypted transport from the database host to the ingestion workers. You can restrict network traffic by allowing only the specific IP ranges used by the sync service.

When a schema changes in the source branch, the pipeline detects the new columns. It then updates the destination tables so analysts see the new structure right away.

Common failure modes and how to scope roles

Many teams make the mistake of using an admin role for their data syncs. An admin key can drop tables, change rows, or read secret system tables by mistake.

Instead, create a read-only role that only sees the tables needed for reporting. If the sync tool only needs five tables, block it from reading the rest.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Shared service accounts also create big blind spots during a security review or outage. When an engineer and a pipeline share one login, you cannot tell who ran a bad query.

Give the sync pipeline its own unique user and rotate that password on a set schedule. Never let human users log in with the pipeline key to run manual checks.

Unlogged queries and sensitive columns pose another risk when moving data to a warehouse. Source tables often hold private data like emails, phone numbers, card numbers, or national IDs.

Select only the safe columns in your sync settings or hash private fields before they leave. For human engineers who inspect the source branch, masking rewrites matched fields in results.

Managing human database checks alongside automated pipelines

Automated syncs run on a fixed schedule, but engineers still need direct database sessions to fix bugs. When a pipeline fails, a developer often logs into the source branch to check bad rows.

Giving engineers static database passwords creates the same risks as using broad pipeline keys. Those passwords sit in local files and stay active long after the ticket closes.

Teams should separate machine sync credentials from human fixing sessions at all times. Machine keys belong only in the sync tool, while human sessions should tie to single sign-on.

Every query an engineer runs to fix a broken sync should leave a clear audit log. Good logs show who ran the query, when it ran, and which branch they touched.

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

Should I use a read replica or the primary branch for syncing data?

Use a replica or dedicated read target whenever possible to keep load off primary nodes. This keeps heavy initial table scans from slowing down live app traffic.

How do I stop private customer fields from reaching the data warehouse?

Configure your sync schema settings to skip or hash columns with emails or card numbers. You can also restrict column read rules on the database user before the sync starts.

What happens to the sync when we deploy a schema change?

The ingestion tool reads the change stream and spots new or dropped columns right away. It then alters the target warehouse table to match the updated source branch.

The query runs. The emails stay hidden.