Q: I have a collection with assorted documents, but I only want to analyze the schema of documents that have a particular field. How can I do this with Studio 3T and are there any shortcuts?
A: If you run the Studio 3T Schema Explorer tool, you will notice that there is a field labeled Query Criteria:
This field will take a MongoDB query document and use that to select which documents will be analyzed. The query will be run before exploring the schema so the schema analyzing will only cover those documents.
But before you start filling that field out with your query, there’s a shortcut you should know.
Head over to the Collections View and create a query there. For this example, say we want to analyze the schema of documents only of people who have an Apple iPhone in our customers database:
Now, rather than cut and paste that query line, just go and click the Schema icon in the tool bar.
And now the Schema analyzer opens up with your query pre-loaded.
Now you are ready to run your analysis and start getting more informed about the data inside your collection:
There we have it, a quick way to select and analyze documents in your collection, no cutting or pasting required.