Q: We’re working on reorganizing our database schemas. I need to start sharing schemas with my co-workers. Is there a way to do that with Studio 3T?
A: Of course. Studio 3T’s Schema Explorer isn’t just an interactive way to dig into how your MongoDB data is structured. It’s got the ability to share that information too. If we run Schema Explorer over a collection, we’ll get a distribution breakdown like this:
You can see how the documents aren’t consistent in what fields appear across the board. We’ve asked it to dig deeper into the arrays in there so we can get an idea of what is being stored there too. Arrays can hold multiple different types of data and assumptions about what types are there can trigger all sorts of errors when you are processing documents. This is all great information, but how do you share it?.
Documentation – The Key To Sharing Schemas
Look up at the tool bar for the Schema Explorer and you’ll find the Generate Documentation button.
This can turn the Schema report into documentation. Click it and up comes this dialog:
Which doesn’t look too promising for sharing. This is super useful for reporting as it pulls every chart, statistic and your comments into a single Word document /.docx document. It effectively makes a reference book for the explored Schema.
But that’s not ideal for all collaboration. Often you will want a more compact view for people to comment and collaborate on. That’s where the second output format comes in. Selecting CSV (.csv) as the format produces a much more compact file with the field name, probability, count, kind, type and comments in each row. If you’ve included array elements, they’ll be listed in there too.
And as a CSV file, it’s quick to import into something like Google Sheets or other collaboration tools and in seconds have spreadsheet like this to share and work with:
Schema Saving
If your colleagues have Studio 3T on their desktop, do remember you can save the results of a Schema Explorer analysis, complete with your comments, and send them the file which they can load into their desktop and continue analysis (providing they have access to the source database).
Where they don’t have Studio 3T or access to the databases in question, sharing via CSV sourced Spreadsheets and Word/DocX reference files is a great way to get the information out there.