Is there currently any way to draw Entity Relation Diagrams when importing CSV? Can't see any mention of it, I might just be dumb though

380 views
Skip to first unread message

Logan A

unread,
Oct 1, 2019, 5:10:46 PM10/1/19
to draw.io
Pretty much as the title says. I'm attempting to import a CSV dataset and map data to ER diagrams. Can't seem to work it out. Please advise.

Marija Radovic

unread,
Oct 2, 2019, 3:50:20 AM10/2/19
to draw.io
Hi Logan,

It should be possible to create ERD via CSV import. 
Examples of import from CSV to draw.io diagrams can be found here: https://about.draw.io/import-from-csv-to-drawio/ 

There is no ERD example, but hopefully, you will be able to create one after you read CSV details described there.

Regards,
Marija

Gaudenz Alder

unread,
Oct 2, 2019, 5:17:58 AM10/2/19
to draw.io
Just to check: You know you can create ER diagrams from create table SQL statements via Arrange, Insert, Advanced, SQL.

Logan A

unread,
Oct 2, 2019, 9:15:40 AM10/2/19
to draw.io
Yes, I was hoping to do it via CSV, as it's compatible with the script I'm using. 

Logan A

unread,
Oct 2, 2019, 9:16:50 AM10/2/19
to draw.io
Hi Marija, 

I'm able to create the table itself, but my issue is populating the rows on the table. Here's my code for reference

```
# labels: {"label1" : "%name%<br>3%name%", "label2": "%name%2"}
# style: swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;fontSize=14;
# namespace: csvimport-
# width: auto
# height: auto
# padding: 5
# ignore: id,refs
# link: url
# nodespacing: 60
# levelspacing: 60
# edgespacing: 40
# layout: auto
## **********************************************************
## CSV Data
## **********************************************************
id,name,position,labeltype
1,Evan Miller,CFO,label1
2,Test,foro,label2
```

Taylor Funk

unread,
Jul 23, 2024, 10:47:00 PM7/23/24
to draw.io Q&A
Using my updated plugin  https://github.com/funktechno/sqltooling-drawio you can import from sql into er diagrams including foreign key relationship lines. It also supports exporting your uml back to sql.
Reply all
Reply to author
Forward
0 new messages