AI / Apache Paimon Interview questions
How do you use the $snapshots system table?
Querying my_table$snapshots returns the history of every snapshot the table has produced, including the commit user, commit time, commit kind, and record counts for that snapshot.
SELECT * FROM my_table$snapshots;
It's the table to check first when you need to know what happened and when: which snapshots exist, how many records each commit added, and which snapshot ID to time-travel back to. Joining it against my_table$schemas on schema_id also lets you recover the exact column layout that was in effect for any given snapshot.
More Related questions...