Entity-relationship diagram from OData $metadata

An OData $metadata document is a precise data model, but reading the XML of a 200-entity SAP service is slow going. The viewer draws it instead:

The diagram is one of five synchronised views. Clicking a box opens the entity type in the detail panel; the source view jumps to its line in $metadata; the data explorer queries its entity set.

Exports

Format Use
PNG slides, tickets, chat
SVG documentation that should stay sharp
Mermaid erDiagram Markdown docs, GitHub/GitLab READMEs, Confluence
Markdown a full text description of every type and property

Works with every OData version

EDMX 1.0 (V2/V3) with associations, EDMX 4.0 (V4/V4.01) with partners and referential constraints, and CSDL JSON are read into one model, so a V2 and a V4 version of the same service produce the same diagram. Try Northwind V2 and Northwind V4.

See the TripPin diagram

Questions

Can I put the diagram into my documentation?

Yes. Export PNG or SVG from the diagram toolbar, or the Mermaid erDiagram text from the export menu — GitHub, GitLab, Confluence and many wikis render Mermaid directly.

My service has hundreds of entity types. Does that work?

Up to 150 types are drawn at once. Pick an entity type and use focus mode to draw only its neighbourhood, which is usually what you want for a large SAP service anyway.