![]() Originally from Cheltenham, England, he received his Bachelors in Computer Science from Cardiff University. Prior to MongoDB, he worked at Red Hat doing technical presales on Linux, Virtualisation, and Middleware. Sam Weaver is the Product Manager for Developer Experience at MongoDB based in New York. I’m super excited to be part of the Compass team and I can’t wait for the next set of releases. This is only version 1.0 of Compass - there is lots of great functionality to come. MongoDB Compass can also be used for free in a development environment. It comes included for production use with our subscriptions, both MongoDB Professional and MongoDB Enterprise Advanced. ![]() Well, MongoDB Compass is available in the download center on. I know you must be wondering - where can I get this thing?! This can be expanded by clicking on the Document Viewer icon on the right-hand side of the page: Documents can be examined in the document viewing pane. One final thing to mention - we didn’t forget about the JSON. You can be building queries with a few clicks of a button in no time at all. Once you hit the Apply button, Compass will execute the query and bring back the results! It’s as easy as it sounds. Continuing with our example, we can select a particular flightId in addition to departures from JFK Airport. In the example below, clicking on the “JFK” bar builds a query matching all documents whose departureAirportFsCode field matches “JFK”:Ĭlicking on other field values adds the field and range to the selection, creating a more complex query. Clicking on a chart value or bar will automatically build a MongoDB query that matches the selected range in the interface. Compass will display a random selection of string values for the field: Visual Construction of Queriesĭo you want an easier way to type out a MongoDB query? Charts in Compass are fully interactive. Here’s another example using a field that stores names. ![]() We can see the minimum age is 16, the maximum age is 56 and the most popular age is late 30’s (the exact value is shown by hovering over the bar itself). ![]() For example, here is a data set containing the age of users. ![]() Imagine the case where you have a field showing a mix of strings and numbers - perhaps there is an application bug somewhere that has crept in and is storing data with a different type than it should be? Data DiscoveryĬompass is able to show histograms to represent the data frequency and distribution within a collection. This is exceptionally useful to understand whether your application is storing data the way that you expect it to. In this example, 81% of documents store phone_no as a string, and the remaining 19% store it as a number:įor sparse fields, where some documents omit a value, Compass displays the percentage of missing values as “undefined.” Here, the age field is missing in 40% of the sampled documents. It reports that there are documents in the collection that contain a field last_login with the type date:Ĭompass also displays a percentage breakdown for fields with varying data types across documents. The example below is taken from a mock dataset that I use when test driving Compass. MongoDB Compass was built to address 3 main goals:Ĭompass displays the data types of fields in a collection’s schema. MongoDB 3.2 introduces MongoDB Compass - a graphical tool that allows you to easily analyse and understand your database schema, as well as allowing you to visually construct queries, all without having to know MongoDB’s query syntax: There has to be a better way - enter MongoDB Compass. Until now, if you wanted to understand the structure of your data, you would have to use the MongoDB shell to issue queries and view data at the command line. However, this flexibility can also make it difficult to understand the structure of the data in an existing database. MongoDB’s flexible schema and rich document structure allow developers to quickly build applications with rich data structures. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |