Synthetic, reproducible example

Try a small data pipeline

See how sample records are checked, loaded, and updated, including what happens when a load fails.

Educational reconstruction using invented records on a local Cartesian grid. No client data, Earth coordinates, or production performance claims.

Run it locally

Python 3.10 or newer. Standard library only; no accounts, credentials, or external datasets. From the repository root:

python examples/spatial-etl/demo.py
python -m unittest discover -s examples/spatial-etl -p test_demo.py -v

Inspect the invented input records (JSON)

Recorded demonstration results

These are outputs of the included teaching example, not measurements of a client system or field accuracy.

Synthetic input rows
12
Accepted initial rows
4
Quarantined input rows
8
Records after recovery
5
Rollback state check
Passed
Synthetic spatial ETL: validation, replay and recovery
The sample pipeline, not the original utility system.
Committed batch results
BatchInsertedUpdatedUnchangedStale skipped
Initial load4000
Identical replay0040
Recovery retry1200
Recovered replay0030
Older source replay0022
Quarantine review
Input rowSynthetic IDReason
5SYN-005crs must be LOCAL:DEMO_CARTESIAN
6SYN-006x must be a finite number in [0, 10000] metres
7SYN-007schema mismatch: missing=['condition'], extra=[]
8SYN-008inspected_at contains an invalid calendar date or time
9SYN-009revision must be a positive SQLite-sized integer
10SYN-010y must be a finite number in [0, 10000] metres
11SYN-011duplicate id in batch; all occurrences quarantined
12SYN-011duplicate id in batch; all occurrences quarantined
Recovered database state
Synthetic IDX (m)Y (m)ConditionRevision
SYN-00110001200attention2
SYN-00218201400clear2
SYN-00345002100attention1
SYN-00479008300clear1
SYN-01250005100attention1

Interpretation and limitations

  • CRS is LOCAL:DEMO_CARTESIAN: arbitrary origin, x right/east, y up/north, metres, valid extent 0 to 10000 on each axis. It has no Earth reference and cannot be overlaid on a real map.
  • A deliberate failure after two updates left every stored value identical to the pre-load snapshot. A subsequent retry committed two updates and one insertion.
  • Repeated batches perform no writes when payload and revision match. Older revisions are skipped. Conflicting equal revisions or reversed inspection dates abort the complete transaction.
  • Quarantine retains each rejected input and its reason. Both occurrences of a duplicated ID are rejected; source ordering never chooses a winner.
  • SQLite is used for a portable transaction demonstration, not presented as PostGIS, a spatial index, a production job scheduler, or a performance benchmark.

Image viewer

100%