They thought the query was safe. It wasn’t.
A single SQL command pulled sensitive user data across regions without anyone noticing. The compliance report lit up red. Systems froze. Meetings followed. What went wrong was not a lack of encryption or authentication. It was the absence of query-level approval for data residency.
Data residency has moved from being a compliance note buried in contracts to a frontline concern for engineering and legal teams. Regulations like GDPR, CCPA, LGPD, and countless local laws make it clear: data must stay within approved geographic borders unless specific, audited permissions allow otherwise. This isn’t just about storage location anymore. The danger lives in the queries themselves. Even a single read operation can violate residency rules if the data flows to the wrong place.
Query-level approval is the missing guardrail. Instead of enforcing rules only when data is stored or deployed, it checks and verifies where that data will end up before a query is executed. This means real-time intervention. If a developer tries to run a query that pulls personal data across a prohibited border, the query stalls until it’s reviewed and approved. Every request becomes traceable. Every approval is logged. The audit trail writes itself.