Hi team, I am trying to make a pack that generates a diagram of all pages, tables and relationships in a document. (I believe in self documenting software)
Small Question
How can I take a document as a parameter and get a list of all tables. And a detailed list of all columns in that table?
Wider Context
My goal is to create a pack that uses a formula or button to created Entity Relationship Diagram for each of my Docs. (Example of an Entity Relationship Diagrams below)
The hard part is getting a list of all tables, and a list of all columns. (Ideally using column type or column formulas to determine if there is a relationship)
Closing thoughts
Its possible there is an existing tool or simpler way. If so please let me know.
Its possible its more complex and I need to get the API involved. Thoughts?
Unfortunately there’s no support for getting the formulas of external formulas and buttons atm, so I’m waiting for an update there before returning to this project
Does your pack only allow to keep track of the tables/columns of only 1 document
when my docs are larger, I get a time-out error when making a diagram. I don’t know what is happening under the hood, so perhaps this is a limitation we have to live with? Did you try it on larger documents (say, with 75 tables)?
Great Pack @Logan_Krantz! I love the attention to detail on the Pack listing, as well as the featured doc. I could see this being useful for a lot of folks.
@joost_mineur - All regular sync tables have a limit of one table per-doc. You can however add multiple syncs to the table, allowing you to bring in different sets of data:
If for UX reasons it is important to have distinct tables then @Logan_Krantz would have to change the table to by a dynamic sync table instead, like the pattern employed by Cross-doc.
The synced tables can be synced to more then one table at a time. Thank @Eric_Koleda for your quick answer above.
Ill have to take a look in the new year at timeout limitations. My biggest doc only had 20 tables but thanks I’d definitely like to support bugger documents. Would you be opposed to removing the data and sharing me a copy of the doc so I can see the errors you are getting?
Finally, @Eric_Koleda Ill have a read of dynamic sync tables and see if its something I am interested in supporting
No problem, it’s a busy time of year. Shoot me a message or post here when you have a sample, and I’ll see what I can do!
Thanks for being my first “stress test“
@Logan_Krantz The pack errored out for me as well; we have around 60-70 tables with many hidden columns. Let me know once you’re able to apply a fix - I love the idea behind your pack and know it will help our team understand connection points between tables.
The biggest downfall is that you have to do the manual step of copy/pasting every time you want an UPDATED diagram.
I really wanted dbdiagram to have an API so I could send the code snippet generated by the pack to dbdiagram and have it generate the image for me.
But it doesn’t
If you find any other service that generates db diagrams using DBML (database markup language) and has an API, let me know! We should do a collaborative!
I am loving the progress we are making in automatic coda diagram!
Thanks Scott! I love the look of DBML as an alternative to the older DotML that I am using.
Souch talent in this thread