Private Network Tableflow: Iceberg SQL Without a Catalog
Private-link Confluent Tableflow on Azure writes Iceberg into an ADLS account limited to selected networks, and a 60-second sync job points Snowflake at the newest metadata file.
Overview
You already know the public version of this idea. Tableflow turns a Kafka topic into Iceberg, publishes it through an Iceberg REST Catalog, and Snowflake Horizon points at that catalog. That walkthrough is Tableflow × Snowflake.
Turn private networking on and that catalog is unavailable. Confluent’s docs say the built-in Iceberg REST Catalog is not supported on private-networking clusters. On Azure the external catalog sync targets do not fill the gap either: Glue is AWS only, and Unity Catalog and Open Catalog are not supported over private networking.
This demo treats ADLS as the source of truth. A VM in your VNet produces Avro stock_trades into an Enterprise cluster over a Private Link Attachment. Tableflow writes Iceberg files into ADLS Gen2 through an egress Private Link gateway. Every 60 seconds a small job finds the newest metadata/*.metadata.json and tells Snowflake to create or refresh an Iceberg table at that path. Analysts still SELECT. The pointer they follow is a metadata file in the container.
The Terraform lives in PrivateNetworkSnowflakeConfluentTableFlowIceberg. The sync pattern comes from Jeremy Ber’s tableflow-manual-sync-to-unity-catalog: discover RUNNING Tableflow topics, register them in the query engine, stay idempotent. This repo points that pattern at Snowflake and Iceberg, and adds the step that hunts down the latest metadata file.
How it works
Kafka records stay on private Azure paths from the producer through Snowflake’s reads of ADLS. Those reads use VNet service endpoints on the Azure backbone. Only Snowflake’s subnets pass the firewall, and the storage account’s public endpoint stays enabled for selected networks. Snowsight still returns query results on the public Snowflake endpoint. Inbound Private Link for that hop needs Business Critical. The sync’s calls to the Confluent API and to Snowflake SQL carry topic names, metadata file paths, and DDL.
- Produce:
producer.pyon the demo VM writes Avrostock_trades(default 50 messages a second) through a Private Link Attachment into an Enterprise cluster inuksouth. Topic names have to start withstock_, because the producer RBAC binding is prefix-scoped.add_topic.pycan add anotherstock_*topic during a demo; the producer re-readstopics.txtevery 30 seconds. - Materialize: Tableflow writes Iceberg into your ADLS Gen2 container (hierarchical namespace, bring-your-own storage). The write path is a Confluent egress Private Link gateway with two access points,
blobanddfs. Those private endpoints show up Pending on the storage account untilscripts/approve-egress-endpoint.shapproves them. - Register:
sync.pyruns from a systemd timer every 60 seconds. It lists Tableflow topics on the Confluent Cloud API, keepsRUNNINGIceberg topics, and listsmetadata/*.metadata.jsonin ADLS with the VM’s managed identity over a blob private endpoint. New topics getCREATE ICEBERG TABLE ... CATALOG = <object store integration> METADATA_FILE_PATH = .... When the snapshot moves, it runsALTER ICEBERG TABLE ... REFRESH. Tables this job created (commentmanaged-by=tableflow-sync) are dropped when Tableflow is gone. Until Snowflake settings exist, the same job logs what it would register and stops. That is discovery-only mode. - Query: Snowflake uses an external volume plus an object-store catalog integration. It reads the same files because the storage firewall (default Deny, selected networks) allows Snowflake’s Azure VNet subnets. That is option A, and it works on any Snowflake edition when the account is in the same Azure region. The default query is
TABLEFLOW_PL_DB.CONFLUENT.STOCK_TRADES.
producer.py ──Private Link──► [stock_trades] ──Tableflow egress PL──► ADLS metadata.json
│
sync.py (every 60s, blob private endpoint) ◄──────────────────────────┘
│
▼
CREATE / ALTER ICEBERG TABLE … REFRESH
│
▼
Snowflake ──service endpoints──► same ADLS files ──► SELECT
Freshness is the Tableflow commit interval plus up to 60 seconds. At the default 50 messages a second, Tableflow commits about every 3 minutes. A low-throughput topic can take up to about 5.
What it demonstrates
- A warehouse table whose catalog is a file. Snowflake cannot auto-refresh Iceberg tables from an object-store catalog integration, which is why the timer exists. The table is read-only and externally managed (
allow_writes = falseon the volume). - Record data on three Azure paths. Producer to Kafka uses the Private Link Attachment. Tableflow to ADLS uses the egress gateway. Snowflake to ADLS uses service endpoints on the Azure backbone, with the account limited to selected networks and its public endpoint still enabled.
- A topic that shows up in SQL without a Snowflake edit. From the VM (
eval "$(terraform -chdir=infra output -raw vm_ssh)"),sudo -u demo /opt/tableflow-demo/run add_topic.py stock_quotescreates the topic, enables Tableflow by copying the BYOS storage spec from a topic Terraform already configured, and lets the next sync run register it. The table appears when the first snapshot lands, and that snapshot is empty. Rows show up on the next one, so allow about five minutes. Topic names have to start withstock_, and each name can only be used once per deployment.
SELECT symbol, side, COUNT(*) trades, ROUND(AVG(price), 2) avg_price
FROM TABLEFLOW_PL_DB.CONFLUENT.STOCK_TRADES
GROUP BY 1, 2
ORDER BY trades DESC;
Technical details
- Two Terraform stacks.
infra/builds the VNet, Private Link Attachment, ADLS account and firewall, Confluent environment, Enterprise cluster, RBAC, egress gateway, DNS, Tableflow, and the demo VM.snowflake/reads that state, adds Snowflake’s subnet IDs to the storage firewall, creates the external volume and object-store catalog integration, then the database, schema, warehouse, and a key-pair service user for the sync. Applyinfrafirst. Applysnowflaketwice, with Azure admin consent in between (snowflake_azure_consent_url, thensnowflake_azure_consent_completed = true). - The volume URL is the blob endpoint.
storage_base_urlisazure://<account>.blob.core.windows.net/<container>/. Tableflow metadata referencesabfss://paths, and Snowflake resolves them under that base URL. - Who can touch the account. Confluent’s multi-tenant app gets
Storage Blob Data ContributorandReaderafter anaz ad sp createretry loop, because cross-tenant Graph calls through theazureadprovider often 403 and the app can take a minute to appear in a new tenant. After consent, Snowflake’s app getsStorage Blob Data Reader. The VM lists blobs with a managed identity. Shared keys are disabled. - Terraform stays on the control plane. The cluster REST endpoint is only reachable inside the VNet, so role bindings use the public control plane, the producer API key sets
disable_wait_for_ready, and topic creation runs on the VM viaaz vm run-command. - A few paths stay public, and they carry metadata or query results. Schema Registry uses its public endpoint (schemas only). Enterprise can put Schema Registry on Private Link if you need it. Snowsight and drivers use the public Snowflake endpoint, so query results leave that way. The sync’s Confluent API and Snowflake SQL calls are control plane. The demo VM has a public IP for SSH from
ssh_allowed_cidrand for package installs. Secrets reach the VM throughaz vm run-command, which is fine for a demo. The Azure tenant has to be yours: Confluent rejects a provider integration that uses Confluent’s corporate tenant ID. - Azure CLI is pinned to the deployment subscription.
scripts/vm-run.shtakes the subscription id and passes--subscriptiononaz vm run-command. The Snowflake stack does the same when it adds and removes storage firewall rules. A CLI session pointed at another subscription would otherwise deploy the app and the subnet rules against the wrong account. - This apply implements option A. Public network access stays enabled so selected networks can include Snowflake’s subnets, while
default_actionis Deny. The README also describes a Business Critical swap: outbound private endpoints withUSE_PRIVATELINK_ENDPOINT = TRUE, and public network access disabled on the storage account.
Challenges & lessons
- Storage is the catalog. On a private-networking cluster the Iceberg REST Catalog is unsupported, and the Azure catalog-sync alternatives are unsupported too. The job that works lists
metadata/*.metadata.json, keeps the newest file, and passes that path toCREATEorREFRESH. - The 60-second timer waits on Tableflow.
AUTO_REFRESHbelongs to the IRC design in the sibling repo. Heretableflow-sync.timerusesOnUnitActiveSec=60, and Tableflow itself commits on a best-effort cadence: about every 3 minutes at the default 50 messages a second, and up to about 5 minutes on a low-throughput topic. A new topic’s first snapshot is empty, so the Iceberg table can exist in Snowflake whileSELECTstill returns no rows. Rows show up on the next snapshot. - Approve both private endpoints. Tableflow needs
blobanddfsaccess points. They land as Pending connections on the storage account. DNS records are read after approval, becauseprivate_endpoint_domainstays empty until the access point is READY. - Match the Snowflake region, and name the account correctly.
SYSTEM$GET_SNOWFLAKE_PLATFORM_INFOreturns Snowflake’s Azure subnet IDs, andaz storage account network-rule add --subscriptionattaches them on the deployment subscription. Those service endpoints line up when the Snowflake account region matchesregion(defaultuksouth). Check withSELECT CURRENT_REGION()before you apply. Terraform wants the organization and account name (CURRENT_ORGANIZATION_NAME(),CURRENT_ACCOUNT_NAME()), not the account locator. The storage account’s Terraform ignores later subnet-ID changes so the snowflake stack can add them out of band. - Consent, then apply again. The first
snowflakeapply creates the external volume and printssnowflake_azure_consent_url. Until a tenant admin accepts it, Snowflake’s service principal is missing and the blob reader role cannot be assigned.snowflake_azure_consent_completedis the circuit breaker. - Provider integration destroy can 409. If Confluent still reports the Azure provider integration
ACTIVE, delete it from state (terraform state rm confluent_provider_integration_setup.azure) and destroy again. The README points at the same cleanup note as the original public-catalog repo. - Live topics sit outside Terraform.
add_topic.pyenables Tableflow on names this stack did not create. They go away with the cluster. If Confluent refuses to delete the cluster, disable Tableflow on those topics in the Confluent Cloud console and run the destroy again.