Sitemap

Member-only story

Automatically Generating yEd Diagrams from Metadata with Python

7 min readSep 20, 2025

How to turn metadata into lineage diagrams, ERDs, and business-friendly mappings — and let yEd handle the layout.

Summary

Creating lineage, impact analysis, and ERD diagrams by hand is slow and fragile.

In this article, I show how to generate GraphML with Python and open it directly in yEd (free). With one click of yEd’s autolayout, your metadata becomes a clean, professional diagram.

We’ll cover:

  • Why yEd is a great (free) visualization engine
  • A tiny Python “package” (helper module) for building GraphML
  • Examples: Lineage, ERD with crow’s-foot, and combined ERD + Lineage with swimlanes
  • Optionality (0..N) vs mandatory (1..N) using dashed vs solid edges
  • Demo code you can copy-paste

💡 Not a Medium member? You can read this article for free using this friend link.

Press enter or click to view image in full size

Why yEd?

yEd Graph Editor is a free, desktop graph tool from yWorks. It loads GraphML (XML for graphs), supports thousands of nodes, and has world-class layout algorithms (Hierarchical, Orthogonal, Organic, Circular, etc.). Because GraphML is just text, we can generate it directly from DuckDB

--

--

Jaco van der Laan
Jaco van der Laan

Written by Jaco van der Laan

Exploring Business & Logical Data Modeling. Writing on Clarity, Structure & Creative Approaches to Data Architecture.