#31351·trino

Time travel configured using session properties

Author: technical-debt-collectorCreated Sep 28, 2026Updated Sep 28, 2026

Feature Request / Improvement

Using time travel feels very limited with the current feature set. Querying only one table or two is fine:

select * from some_catalog.some_schema.some_table
for timestamp as of timestamp '2026-09-25 15:15:00 Europe/Oslo'
where some_column = 'some value';

but managing literals quickly becomes finicky and hard for larger queries involving many tables.

We also have a number of views consuming from these tables too where time travel would've been nice, but this is currently not possible because views don't take any parameters. The only way around this that I can see is either materializing them, writing them as tables or having the consumer run the view's query manually with timestamp literals carefully inserted everywhere applicable, but none of these are acceptable compromises to us.

My proposal is a session property along the lines of query.iceberg.as-of-timestamp where one can specify a timestamp that is automatically used for subsequent queries in the session. Developers and analysts will then only have to set it once per session, and I believe this could also work for views.

Having this as a session property is obviously a footgun, but it's also a cheap quality of life-improvement to time travel for scenarios where multiple objects are involved

I'm happy to look into this myself and raise a PR if you think this is could be a good feature to have.