sap-cds-erd
An AWK script of roughly 200 lines that reads .cds files and sketches an entity-relationship diagram as Mermaid output, with nothing to install beyond awk.
Shows that a useful ER view can be pulled straight out of CDS source with nothing installed — awk is already on the machine. Roughly 200 lines, a worked bookstore example, and Mermaid output.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1@rabestromaintainerJegors ČemisovsContributes to this
In the atlas: contributes to 1@jegors-cemisovs1 contributor
Before choosing this
Signals
ActivityQuietNo published releases; repository quiet for 26 months
It publishes no releases, and its repository has been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.
What it declares
Every artifact
- Type
- CLI
- Origin
- Independently maintained
- Runtime
- build time
As a CLI
- Distributed through
- does not say
Connections
Turning a data or code model into a readable picture
Download
README
quoted from rabestro/sap-cds-erd under Apache-2.0, read= SAP CDS Entity Relationship Diagrams :hide-uri-scheme:
The small AWK script generate https://mermaid.js.org/[mermaid] Entity Relationship diagrams from SAP Cloud Application Programming Model files.
== How to run script
[source,shell]
gawk -f src/cds2erd.awk db/* > bookstore.mermaid
Alternatively, you can move the script to the bin directory and make it executable:
[source,shell]
chmod +x cds2erd.awk
In this case you can call the script without specifying an interpreter:
[source,shell]
cds2erd.awk schema.cds > schema.mermaid
== Sample generated ER diagram
Below is the database schema from the project https://github.com/SAP-samples/cloud-cap-samples/[SAP Cloud CAP Samples Bookstore]
[source,mermaid]
erDiagram Books { String title String descr Integer stock Decimal price Currency currency Decimal rating TechnicalBooleanFlag isReviewable }
Authors {
String name
Date dateOfBirth
Date dateOfDeath
String placeOfBirth
String placeOfDeath
}
Genres {
String name
String descr
Integer ID PK
}
Notes {
String note
}
Orders {
String OrderNo
User buyer
Decimal total
Currency currency
}
OrderItems {
Integer quantity
Decimal amount
}
Reviews {
Rating rating
String title
String text
}
Orders |o--o{ OrderItems : ""
OrderItems |o--o| Books : ""
Genres }o--o| Genres : ""
Books |o--o{ Reviews : ""
Books |o--o| Genres : ""
Books }o--o| Authors : ""
History
Others providing
Compare all 6 on the Model visualisation page →- ZUML_DIAGRAMZUML_DIAGRAMAn ABAP program that draws a UML class diagram of chosen objects, rendered over the internet through PlantUML and shown inline in CL_GUI_HTML_VIEWER.independent, abapABAP program drawing UML class diagrams through PlantUMLfrom ABAP
- ABAP Search and Analysis ToolsABAP Search and Analysis ToolsAn Eclipse plugin with an object search dialog over repository objects and a view that analyses CDS views top-down and answers where-used questions, fed by its own ADT backend in the system.independent, abapEclipse plugin for ABAP object search and CDS view analysisfrom ABAP
- abapgraphabapgraphAn ABAP library for creating Graphviz graphs, written to give the maintainer's own ABAP debugger object graph extension a more compact layout, with demo code as its documentation.independent, abapABAP library for creating Graphviz graphsfrom ABAP
- @sap/cds-dk@sap/cds-dkThe command line client and development toolkit for CAP projects, with the commands cds build, cds deploy, cds watch and cds add among them.sap official, capCommand line client and development toolkit for CAPfrom CAP
- SAP2MooseSAP2MooseAn ABAP program that extracts model data from a system as a SOMIX model, for Moose2Model to draw as a dependency diagram.independent, abapAn ABAP program that extracts model data from a system as a SOMIX model, for [Moose2Model](http://www.moose2model.org) to draw as a dependency diagram.from ABAP
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- Withheld verdicts retired with the rings. Nothing is recused from: facts about an entry are facts whoever maintains it, and a starting-point is answered by description.to_build_on_it.
- First entered as an option with a when_not_to_use listing everything it is not, which framed a published sketch as a weak dependency. It was never offered as one. The facts are unchanged; they now sit under what taking it further would involve.
- First seen.
For your agent
- Ref
artifact:rabestro-sap-cds-erd- JSON
- /artifacts/rabestro-sap-cds-erd.json
- MCP
- Connecting an agent