It’s easy enough to use the MongoDB command line utility mongodbimport.exe to bring JSON docs into MongoDB collections and then use the MongoDB mongo.exe command line stats() function to learn more about it, but why not use a tool to make this a bit more accessible to the casual user.

To experiment, first, let’s grab the sakila database (historically a MySQL test DB) from the blog of Dell’s own Guy Harrison and unpack it as described in the blog, but instead of using MongoDB to import and analyze, let’s use Toad…

First, let’s use Toad to create a new collection (table if you insist on RDBMS terminology), just right click and ‘Create New Collection’


In the wizard, I’ve named my new collection ‘imported_customers’, then click Finish


Once the newly created table is shown on the LHS (Left Hand Side) of the toad UI, right click the collection we created in the previous step and choose Import Collection (.json)


Point to the previously unzipped customers.json file from the sakila tar you downloaded earlier.

And success…


Now, we can at a glance get some insight into what data is contained, as well as the ‘jagged-ness’ of the schema itself.  We do this in several ways.  First with the Grid View…


The JSON view…


The Index view of Data along with underlying JSON…


The Stats view which is the same as running db.<collectionName>.stats() in MongoDB shell, and kind of redundant because we also see the stats in the Quick Doc window!


And there you have it, very easy to import a JSON doc into Toad and then make some sense of the schema and the size and type of data within.