Data sovereignty

The data stays where you put it. Snowflake comes to the data.

Querying on-premise Apache Iceberg from Snowflake through an outbound tunnel you control.

Kevin Keller · kevinkeller.org

Why it matters

Some data cannot move to the cloud, but still needs analytics

  • GDPR: personal data about EU residents may not leave the EU.
  • Finance: trading records stay under domestic jurisdiction.
  • Defence: some data is barred from foreign-operated clouds.
  • Healthcare and manufacturing: patient records and process data stay controlled.

The principle

Sovereignty means only the owner controls access, at any moment

Technically enforced, not just contractually promised.

It comes down to who initiates the connection, and who can turn it off.

The idea

The on-premise side always initiates the connection

A small agent opens an outbound WebSocket to Snowflake. No inbound ports, no VPN. When the agent stops, Snowflake has no path to the data.

The off switch

The data owner decides when and how data is reachable

  • Stop the agent at night, at weekends or during maintenance.
  • Schedule it for business hours only.
  • Restrict which roles and endpoints it authenticates to.
  • Revoke the access token to end all access instantly.

Structured logs show every connection and request.

How it works

Two containers in Snowflake, neither holds your data or credentials

ContainerRole
tunnel-sidecarAuthenticates the agent, RSA-2048 key exchange, AES-256 encryption, port forwarding
iceberg-agentIceberg REST and S3 proxy, embedded DuckDB engine, writes results to Snowflake

No hyperscaler network or PrivateLink required.

The sovereignty spectrum

Choose per query how much data lands in Snowflake

PatternData in Snowflake?Governance
Notebook with DuckDBNeverNone
query_iceberg() UDFResult cache onlyRBAC on the UDF
query_iceberg_to_table()ExplicitlyFull Horizon
sync_and_query() procedureExplicitlyFull Horizon

The trade-off

Maximum sovereignty or full governance, decided per use case

  • Notebook: nothing persisted or cached, gone when the session ends
  • But: no masking, RBAC or lineage on the result
  • Table sync: an explicit, owner-controlled data movement
  • And: masking, row policies, lineage and joins with cloud data

Who it's for

Any organisation with data that must stay put

  • Data residency rules: GDPR, DORA, HIPAA and localisation laws.
  • Significant on-premise or private-cloud investment.
  • Competitive or IP-sensitive data.
  • Air-gapped or outbound-only environments.
  • Hybrid governance: some data on-premise, some in Snowflake.

What's next

The same tunnel can carry more than tables

  • Multiple catalogs and storage endpoints through one tunnel.
  • Writing results back to the on-premise Iceberg catalog.
  • On-premise AI models exposed to Snowflake for inference.
  • Production hardening: secrets manager, disconnect alerts, SIEM logs.

The takeaway

When the agent is off, there is no connection to the data. The owner holds the switch.

Read the full article

Kevin Keller · Reference architecture for educational purposes, not a production-ready solution