Skip to content

time_travel

sqllocks_spindle.incremental.time_travel

Time-travel snapshot generation for Spindle — C5 monthly point-in-time snapshots.

Classes

TimeTravelConfig dataclass

Configuration for time-travel snapshot generation.

Snapshot dataclass

A point-in-time snapshot of the dataset.

TimeTravelResult dataclass

Result of time-travel generation.

Methods:
get_snapshot(month)

Get snapshot by month index.

to_partitioned_dfs()

Return all snapshots combined with a _snapshot_date column.

TimeTravelEngine

Generate monthly point-in-time snapshots showing data evolution.

Methods:
generate(domain, config=None, scale='small')

Generate monthly snapshots of a domain's data.

Month 0 is the initial dataset. Each subsequent month applies: - New entity growth (inserts) at growth_rate * seasonality multiplier - Status transitions (updates) at update_fraction rate - Churn (soft deletes) at churn_rate

Returns a TimeTravelResult with N+1 snapshots (month 0 through month N).