Open dennisangemi opened 1 year ago
Currently frictionless lets you run
frictionless
frictionless convert datapackage.yaml --er-diagram
and the output is a DOT file. Ref:
Use frictionless2md to generate a section of the output (md) with a mermaid ERD.
Take this repo as example. Note that datapackage.yaml has multiple foreign keys.
When I run
the DOT output is
digraph "dati-tv-elezioni-ue-2019"{ "contenuti" [shape=plaintext,label=<<table bgcolor="#f5f5f5" border="0" cellborder="0" cellspacing="0" cellpadding="6"><tr><td colspan="2" bgcolor="#306996"><b><font color="#ffffff">contenuti</font></b></td></tr><tr><td port="id_contenuton" align="left">id_contenuto</td><td port="id_contenutot" align="right"><font color="#333333">string</font></td></tr><tr><td port="id_puntatan" align="left">id_puntata</td><td port="id_puntatat" align="right"><font color="#333333">string</font></td></tr><tr><td port="tipologian" align="left">tipologia</td><td port="tipologiat" align="right"><font color="#333333">string</font></td></tr><tr><td port="UEn" align="left">UE</td><td port="UEt" align="right"><font color="#333333">boolean</font></td></tr><tr><td port="id_ospiten" align="left">id_ospite</td><td port="id_ospitet" align="right"><font color="#333333">string</font></td></tr><tr><td port="keywordn" align="left">keyword</td><td port="keywordt" align="right"><font color="#333333">string</font></td></tr><tr><td port="startn" align="left">start</td><td port="startt" align="right"><font color="#333333">time</font></td></tr><tr><td port="endn" align="left">end</td><td port="endt" align="right"><font color="#333333">time</font></td></tr><tr><td port="sentimentn" align="left">sentiment</td><td port="sentimentt" align="right"><font color="#333333">string</font></td></tr></table>>] "ospiti" [shape=plaintext,label=<<table bgcolor="#f5f5f5" border="0" cellborder="0" cellspacing="0" cellpadding="6"><tr><td colspan="2" bgcolor="#306996"><b><font color="#ffffff">ospiti</font></b></td></tr><tr><td port="id_ospiten" align="left">id_ospite</td><td port="id_ospitet" align="right"><font color="#333333">string</font></td></tr><tr><td port="nomen" align="left">nome</td><td port="nomet" align="right"><font color="#333333">string</font></td></tr><tr><td port="cognomen" align="left">cognome</td><td port="cognomet" align="right"><font color="#333333">string</font></td></tr><tr><td port="titolon" align="left">titolo</td><td port="titolot" align="right"><font color="#333333">string</font></td></tr><tr><td port="appartenenzan" align="left">appartenenza</td><td port="appartenenzat" align="right"><font color="#333333">string</font></td></tr></table>>] "puntate" [shape=plaintext,label=<<table bgcolor="#f5f5f5" border="0" cellborder="0" cellspacing="0" cellpadding="6"><tr><td colspan="2" bgcolor="#306996"><b><font color="#ffffff">puntate</font></b></td></tr><tr><td port="id_puntatan" align="left">id_puntata</td><td port="id_puntatat" align="right"><font color="#333333">string</font></td></tr><tr><td port="trasmissionen" align="left">trasmissione</td><td port="trasmissionet" align="right"><font color="#333333">string</font></td></tr><tr><td port="datan" align="left">data</td><td port="datat" align="right"><font color="#333333">date</font></td></tr><tr><td port="durata_puntatan" align="left">durata_puntata</td><td port="durata_puntatat" align="right"><font color="#333333">time</font></td></tr></table>>] "trasmissioni" [shape=plaintext,label=<<table bgcolor="#f5f5f5" border="0" cellborder="0" cellspacing="0" cellpadding="6"><tr><td colspan="2" bgcolor="#306996"><b><font color="#ffffff">trasmissioni</font></b></td></tr><tr><td port="trasmissionen" align="left">trasmissione</td><td port="trasmissionet" align="right"><font color="#333333">string</font></td></tr><tr><td port="reten" align="left">rete</td><td port="retet" align="right"><font color="#333333">string</font></td></tr><tr><td port="canalen" align="left">canale</td><td port="canalet" align="right"><font color="#333333">string</font></td></tr><tr><td port="numeron" align="left">numero</td><td port="numerot" align="right"><font color="#333333">integer</font></td></tr></table>>] "puntate":id_puntatan -> "contenuti":id_puntatan; }
If i visualize it with this tool or if I convert .dot to .png with Graphviz
dot -Tpng erd.dot > out.png
I obtain
why is there only one arrow?
Introduction
Currently
frictionless
lets you runand the output is a DOT file. Ref:
Idea
Use frictionless2md to generate a section of the output (md) with a mermaid ERD.
Issue
Take this repo as example. Note that datapackage.yaml has multiple foreign keys.
When I run
the DOT output is
If i visualize it with this tool or if I convert .dot to .png with Graphviz
I obtain![out](https://user-images.githubusercontent.com/77018886/222004793-96a8c132-530d-427c-abe8-088752df0a79.png)
why is there only one arrow?