UK FirmIQOpen the app

Blog · Snowflake, Apache Iceberg, dbt, Time Travel, AWS Glue · 5 min read

Pin Iceberg Snapshots in Snowflake with Version Tags for dbt

2 December 2026

Rows of near-identical caped superhero figurines on a desk, each with small colour or sunglasses differences, one in sharp focus.

Your Monday report just disagreed with itself, and nothing in your pipeline changed. The likely cause is that the Iceberg table underneath it did. A Spark job committed a new snapshot between your first read and your second. If you read from AWS-managed Iceberg through Snowflake, a version tag lets you pin one snapshot for the length of a dbt run. You get a repeatable read without copying the source data.

Why cloning does not help here

On a native Snowflake table you would clone it and read the clone. Third-party write-ups say that clustering, cloning and replication are unavailable for externally managed Iceberg tables. Snowflake's own documentation describes clones of Snowflake-managed Iceberg tables, which implies the option is absent when AWS owns the catalog. Check the current docs before you rely on that, because some of these sources are not Snowflake's.

A version tag fills the gap at table level. It is a named reference to a single Iceberg snapshot and it stays put when newer snapshots arrive, unless you repoint it. The tag is a label, not a duplicate of the data. The Parquet files stay in S3 and nothing is copied.

The pipeline

The flow has four stages, and only the last one writes any data.

Spark / Glue writers
        |
        v
S3 (Parquet + Iceberg metadata) <--- Glue REST catalog
        ^
        | read in place, no copy
        |
Snowflake catalog-linked database
        |
        v
dbt Cloud run
  1. tag the current snapshot with a per-run name
  2. read at that tag, join to reference data
  3. persist the result as a native Snowflake table
  4. drop the tag, or let it expire

Snowflake reaches the Glue-managed tables through a catalog-linked database. dbt supports this route: dbt v2.0 handles table and incremental materialisations on Glue Iceberg tables through a catalog-linked database configured in catalogs.yml. Snowflake's setup needs a catalog integration, an external volume if the catalog cannot vend credentials, and a linked database.

What the tag does to the timeline

Writers keep committing while your run reads one fixed point.

S1 --- S2 --- S3 --- S4 --- S5     writers carry on
               ^
          tag: run_42

A read through run_42 returns S3, whatever S4 and S5 contain. That is the whole idea.

The statements

The syntax comes from the Snowflake documentation. You tag the current snapshot with ALTER ICEBERG TABLE t CREATE VERSION_TAG run_42;. You read it with SELECT * FROM t AT (VERSION_TAG => 'run_42');. You remove it with ALTER ICEBERG TABLE t DROP VERSION_TAG run_42;.

Tagged reads work in joins and views, and as the source for CTAS, MERGE or INSERT…SELECT. That covers your conformed dataset: read the tagged table, join it to your reference data, and write the result to a native Snowflake table. That output is a derived dataset, not a copy of the source. A tag is never a write target.

I found no dbt guide specific to version tags, so wiring this into dbt is my suggestion, not documented practice. An on-run-start hook can create a tag named after the run, models can read through it, and an on-run-end hook can drop it. The role needs OWNERSHIP on the table to create or drop a tag, and SELECT to query.

The tag has a lifecycle

By default a tag lives until you drop it. Adding RETAIN n DAYS makes it expire on its own, and the expiry is stored in the Iceberg metadata, so other engines see it too. Dropping a tag removes the name only. It does not delete data files. Once no tag points at a snapshot, normal retention and maintenance apply again.

Watch the clock on retention. It is measured from the moment the snapshot was committed, not from when you created the tag. Tag an old snapshot with a short retention and it may lapse almost immediately. The clause also only works alongside AS OF.

The caveat that matters most

With AWS-managed tables, the external catalog decides when snapshots expire. Snowflake's documentation says the external catalog controls snapshot expiration in cloud storage. Snowflake can query a tag beyond its own retention period, but only while the files still exist.

So a tag gives you immutability only if your Glue or Spark maintenance does not expire the snapshot or delete its files. The tag sits in shared Iceberg metadata, so it should protect the snapshot from other engines' expiry logic.

Other limits to plan around:

Reproducing a run

If a number is questioned later, you need the tagged snapshot, the model code and the reference data as they stood. Keep the tag for as long as the audit window requires, then let it expire. That gives you a recreatable result without a second copy of the source.

The same discipline applies to company data. If you join internal records to a register such as Companies House, you want to know which version of the register produced a figure. UKFirmIQ syncs Companies House, Gazette and filed accounts data daily, so it can serve as a dated reference source for those joins.

FAQ

Is a native Snowflake output table duplication? It is a derived dataset built from a pinned read. The source files are not copied.

Why not use a snapshot ID or timestamp? Neither keeps the snapshot alive. A tag is a named reference that does.

Does dropping a tag delete data? No. It removes the name only.

Check any UK company's health score, officers and filings.

Search companies free →