Edit on GitHub

StateSync

State sync is how SQLMesh keeps track of environments and their states, e.g. snapshots.

StateReader

StateReader provides a subset of the functionalities of the StateSync class. As its name implies, it only allows for read-only operations on snapshots and environment states.

EngineAdapterStateSync

The provided sqlmesh.core.state_sync.EngineAdapterStateSync leverages an existing engine adapter to read and write state to the underlying data store.

 1"""
 2# StateSync
 3
 4State sync is how SQLMesh keeps track of environments and their states, e.g. snapshots.
 5
 6# StateReader
 7
 8StateReader provides a subset of the functionalities of the StateSync class. As its name
 9implies, it only allows for read-only operations on snapshots and environment states.
10
11# EngineAdapterStateSync
12
13The provided `sqlmesh.core.state_sync.EngineAdapterStateSync` leverages an existing engine
14adapter to read and write state to the underlying data store.
15"""
16
17from sqlmesh.core.state_sync.base import (
18    StateReader as StateReader,
19    StateSync as StateSync,
20    Versions as Versions,
21)
22from sqlmesh.core.state_sync.cache import CachingStateSync as CachingStateSync
23from sqlmesh.core.state_sync.common import (
24    CommonStateSyncMixin as CommonStateSyncMixin,
25    cleanup_expired_views as cleanup_expired_views,
26)
27from sqlmesh.core.state_sync.engine_adapter import EngineAdapterStateSync as EngineAdapterStateSync