Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate DBML and dbdiagram.io #690

Open
krlmlr opened this issue Nov 1, 2021 · 6 comments
Open

Investigate DBML and dbdiagram.io #690

krlmlr opened this issue Nov 1, 2021 · 6 comments
Milestone

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented Nov 1, 2021

for drawing.

See r-dbi/DBI#312 for detail.

@krlmlr krlmlr added this to the bluesky milestone Nov 1, 2021
@smgogarten
Copy link

I'd like to be able to import DBML files into R. Is adding that functionality to dm already underway, or planned soon?

@krlmlr
Copy link
Collaborator Author

krlmlr commented Jan 29, 2022

Thanks. We don't have a deadline for this feature yet. Would you like to share a DBML file you'd like to import?

Note that this issue refers to https://www.dbml.org/home/.

@smgogarten
Copy link

Here's an example file: https://github.com/UW-GAC/primed_data_models/blob/02fc6519dc02f3bdd8a9cfdcbf87083c092e2bc1/PRIMED_data_model_draft.dbml

My goal is to load the DBML file into a dm object to define the data model, and then be able to check that another set of data frames conforms to that model.

@krlmlr
Copy link
Collaborator Author

krlmlr commented Feb 2, 2022

Thanks. I tried dbml2sql, but it doesn't seem to offer the JSON output that the JS module promises: https://www.dbml.org/js-module/ . If we can convert to JSON, we might be able to create a dm from that.

I found https://github.com/UW-GAC/AnvilDataModels/blob/main/inst/extdata/data_model.tsv, I wonder how did you create the tsv representation?

@smgogarten
Copy link

I typed it in manually with a spreadsheet editor. My current plan (until a DBML parser exists in R) is to switch to maintaining the data model as tsv, which I can then import to dm or write to DBML using the functions in the AnvilDataModels package.

@krlmlr
Copy link
Collaborator Author

krlmlr commented Feb 9, 2022

There's a TypeScript based visualization project for DBML at https://github.com/softwaretechnik-berlin/dbml-renderer. Might be worthwhile packaging this as an htmlwidget.

@krlmlr krlmlr modified the milestones: bluesky, book Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants