GitHub user shubhamjrd4559-sudo created a discussion: feat(erd): show primary keys and relationship columns in generated diagram
### Problem The generated PlantUML ERD lists model fields and their types and draws relationships between tables. It does not identify primary-key columns or show which columns connect related tables. Readers must inspect the model definitions to understand key fields and join paths. ### Proposed solution Enhance the existing ERD generation data and PlantUML template to: - Mark primary-key columns in each entity. - Label relationships with the source and referenced columns when that metadata is available. - Keep rendering models and relationships when optional key or column metadata is unavailable. ### Context Superset already has ERD generation tooling in `scripts/erd/erd.py` and a PlantUML template. The generator currently collects column names and types and renders table-level relationships. This proposal builds on that tooling to make the generated diagram more useful to developers. ### Expected result The generated ERD makes primary keys and join paths easier to understand without requiring readers to inspect each model definition. ### Scope This is a developer documentation and tooling improvement. It does not change Superset runtime behavior or database schemas. ### Validation - [ ] Add or update a focused test for the generated PlantUML output. - [ ] Verify primary-key markers and relationship labels in the generated diagram. - [ ] Confirm models with unavailable key or relationship-column metadata still render. GitHub link: https://github.com/apache/superset/discussions/45786 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
