Skip to content

docs: data-driven system-catalog reference, phase 1 (mz_active_peeks)#37659

Draft
antiguru wants to merge 6 commits into
MaterializeInc:mainfrom
antiguru:catalog-docs-data-phase1
Draft

docs: data-driven system-catalog reference, phase 1 (mz_active_peeks)#37659
antiguru wants to merge 6 commits into
MaterializeInc:mainfrom
antiguru:catalog-docs-data-phase1

Conversation

@antiguru

Copy link
Copy Markdown
Member

Motivation

The system-catalog reference pages carry many RELATION_SPEC_UNDOCUMENTED markers.
Documenting them by hand means writing near-duplicate tables for every _per_worker and _raw sibling.
This starts moving the column tables into doc/user/data, so a relation is defined once and its variants render from that single definition.

Description

Phase 1 vertical slice on the mz_active_peeks family, proving the pipeline end to end.
Adds a catalog-relation Hugo shortcode, a per-schema YAML data entry (doc/user/data/mz_introspection.yml) whose entries carry base columns plus a variants list, and a FROM_YAML marker mode in ci/test/lint-docs-catalog.py that emits the same catalog checks from the data instead of an inline table.
The base-table check stays byte-identical to the old inline output; variant checks are name-sorted columns-and-types only (the per-worker worker_id column is not always last).
Type links render through the markdown link hook so they pick up the baseURL prefix.

Phase 2 (migrating the remaining mz_introspection relations) is stacked on this branch.

Verification

ci/test/lint-docs-catalog.sh reports no diff, the regenerated test/sqllogictest/autogenerated/mz_introspection.slt passes, and hugo + htmltest are clean.

antiguru added 6 commits July 15, 2026 04:09
Emit sqllogictest checks for a relation from its doc/user/data/<schema>.yml
entry when a RELATION_SPEC marker carries FROM_YAML, so table docs can be
rendered from data instead of hand-written markdown tables.
Swap the mz_active_peeks system-catalog section to the catalog-relation
shortcode backed by doc/user/data/mz_introspection.yml, and regenerate the
checked-in sqllogictest from the FROM_YAML lint mode.
Rendering the type cell as raw HTML bypassed the render-link markup hook,
so absolute /sql/types URLs shipped without the baseURL /docs prefix and
htmltest flagged them as missing targets. Render the type as a markdown
link via RenderString instead, matching the meaning cell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant