Mapi treats the row progression string as the compact source representation and expanded rows as a cacheable derivative. The examples below are synthetic.
Store the compact section code directly when the section is the lookup unit.
SET venue:demo-arena:section:101:row_progression "AA:DD,A:C,1:12,13=13W"
Good for:
- Fast section lookup
- Small memory footprint
- Change detection by comparing compact strings
Use a hash when a section has several related fields.
HSET venue:demo-arena:section:101 \
row_progression "AA:DD,A:C,1:12,13=13W" \
row_count "20" \
updated_by "synthetic-import" \
parser_version "0.1.0"
Good for:
- Keeping parser metadata next to the compact code
- Updating one field without rewriting the whole document
- Fetching all section metadata in one call
Cache expanded rows as a JSON derivative. The compact code remains the source value; the expanded rows can be regenerated when parser logic changes.
JSON.SET venue:demo-arena:section:101:expanded $ '{
"venue_id": "demo-arena",
"section_id": "101",
"row_progression": "AA:DD,A:C,1:12,13=13W",
"rows": [
{"name": "AA", "position": 1},
{"name": "BB", "position": 2},
{"name": "CC", "position": 3},
{"name": "DD", "position": 4},
{"name": "13", "position": 20},
{"name": "13W", "position": 20}
]
}'
Good for:
- Agent tools that need row-level context without reparsing
- UI preview endpoints
- Diff workflows that compare expanded rows across venue revisions
With Redis Query Engine, store compact and derived fields that support section search and review workflows.
Example index shape:
FT.CREATE idx:venue_sections ON JSON PREFIX 1 venue: \
SCHEMA \
$.venue_id AS venue_id TAG \
$.section_id AS section_id TAG \
$.row_progression AS row_progression TEXT \
$.row_count AS row_count NUMERIC \
$.has_equivalents AS has_equivalents TAG \
$.has_gaps AS has_gaps TAG
Example document:
JSON.SET venue:demo-arena:section:101:index $ '{
"venue_id": "demo-arena",
"section_id": "101",
"row_progression": "AA:DD,A:C,1:12,13=13W",
"row_count": 20,
"has_equivalents": "true",
"has_gaps": "false"
}'
Queries:
FT.SEARCH idx:venue_sections '@venue_id:{demo-arena} @has_equivalents:{true}'
FT.SEARCH idx:venue_sections '@venue_id:{demo-arena} @row_count:[10 50]'
Venue changes can trigger downstream review without exposing customer data.
- Import a new compact venue map.
- Parse and validate each section.
- Store compact strings and expanded row caches in Redis.
- Diff the new compact map against the previous revision.
- Publish changed sections to a review queue.
- Let an agent summarize affected inventory, suspicious gaps, aliases, or row count changes for a human operator.
Synthetic event payload:
{
"event": "venue.section.changed",
"venue_id": "demo-arena",
"section_id": "101",
"old_row_progression": "AA:DD,A:C,1:12",
"new_row_progression": "AA:DD,A:C,1:12,13=13W",
"review_reason": "equivalent-row-added"
}This keeps the workflow auditable: the compact code is the input, expanded rows are deterministic, and diffs explain why a downstream marketplace or inventory review was requested.