You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SNOW-3473261: Add Iceberg tag time travel via version_tag
Add ``version_tag`` time-travel parameter that emits Snowflake's
released ``AT(VERSION_TAG => '<name>')`` clause — the tag-only form
of Iceberg time travel (Spark Iceberg's
``VERSION AS OF '<tag_name>'`` for tag reads).
Scope: tag reads only. Branch reads are deferred until Snowflake's
unified ``VERSION_REF`` syntax (which subsumes branch + tag) ships;
the Python kwarg ``version_tag`` and SQL ``VERSION_TAG`` keyword
match Snowflake's already-released grammar.
Mirrors the merged ``version=`` (snapshot-id) PR (#4231):
* Hidden behind ``**kwargs`` on ``Session.table()``,
``DataFrameReader.table()``, and ``Table.__init__()`` — consumed
by Snowpark Connect, not part of the advertised public surface
yet.
* ``DataFrameReader`` reader option aliases ``version_tag`` and
``version-tag`` (matching the ``snapshot-id`` / ``snapshot_id``
style); both auto-set ``time_travel_mode='at'`` since tag reads
are positional (bound to a specific snapshot), not range-of-time.
* Validation: ``time_travel_mode='before'`` is rejected;
``version_tag`` is mutually exclusive with the other time-travel
parameters (``statement``, ``offset``, ``timestamp``, ``stream``,
``version``); non-string and empty tag names are rejected.
* No AST proto changes — the field travels through ``**kwargs``
the same way ``version=`` does.
* No CHANGELOG entry — internal kwargs surface, not customer-
visible (matches PR #4231).
Unit tests cover SQL emission, validation, conflicts, and
``_extract_time_travel_from_options`` extraction for both alias
forms. Two integ tests under ``tests/integ/test_dataframe.py`` are
added but ``pytest.mark.skip``'d pending a CI account with a
CLD-linked unmanaged Iceberg table that has named tags and
``FEATURE_ICEBERG_TIME_TRAVEL`` enabled (manual reproducer lives
in the snowflake-eng/sas repo).
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments