catalog
Schema reference for the catalog and catalog_latest SQL views — full catalog JSON snapshots produced by catalogers, with history over time.
catalog
catalog_latestThe catalog view provides a historical timeseries of catalog JSONs generated by running catalogers over time. Each row is a complete catalog snapshot at a point in time.
The catalog_latest view holds only the current catalog. It is guaranteed to return at most one row, and no rows until Lunar Hub has published a configuration manifest.
Schema
Both views share the same columns.
timestamp
TIMESTAMP
When the catalog last changed
captured_at
TIMESTAMP
When this version was recorded. NULL on the newest row when the current catalog has changed since the last recording. catalog only
catalog_json
JSONB
The complete catalog data in JSON format
Notes
The catalog JSON contains the full inventory of components and their metadata. The format is defined on the Catalog JSON page
catalog_latestreturns the same document aslunar cataloger get-json, so a query and the CLI always agreetimestampis when the catalog last changed — it does not advance when a cataloger runs and produces the same resultThe history is sampled, not exhaustive. Versions are recorded periodically, so several changes landing close together may appear as one row. A catalog that changes and changes back between recordings leaves no trace
History begins when your Lunar Hub was upgraded to record it. Catalogs from before that point are not available here — use
lunar cataloger get-json --ts, which reconstructs any past catalog from the cataloger delta historyOrder the history by
captured_at, not bytimestamp.timestampreflects when the catalog changed and can repeat across rows;captured_atalways increases
Usage examples
Get the current catalog:
Track how the component count has changed over time:
List every component in the catalog with its domain and owner:
Fetch the catalog only when it has changed since you last looked. The timestamp filter is evaluated before the document is assembled, so a poll that finds nothing new is cheap — prefer this to re-fetching the whole document on a schedule:
For per-component queries, the components view is usually a better fit than unpacking this document — it is row-shaped and indexed.
Last updated
