In this post, we’ll show you the features and functionalities of Studio 3T’s Table View, one of three ways to explore data in our MongoDB GUI.
- Show Embedded Fields
- Track Which Fields You’ve Expanded
- Step Into Array-Valued Columns
- Hide Columns
- Restore Default View
- Hotkeys and Other Settings
In case you haven’t yet, download Studio 3T here:
If you’re a MongoDB user, chances are you’ve seen such a mongo shell output:
And pretty() can only do so much.
Sure, MongoDB has its perks, but with mongo shell as the out-of-the-box MongoDB interface, many longed for table view in MongoDB, similar to the familiar interface found in SQL databases.
Studio 3T – then MongoChef – was one of the first MongoDB GUIs to introduce table view to MongoDB. Users could edit data in-place, step into and out of embedded fields effortlessly, and switch to Tree or JSON view as they please.
The old Table View couldn’t step into array-valued columns, only into individual arrays. It didn’t support hiding columns, which is useful to reduce the view to the most important data. It wasn’t possible to view nested fields next to their parent columns, making it difficult to navigate nested data structures. Viewing a table with a few hundred columns also bore a performance cost.
Enter Studio 3T’s new Table View: a simpler, more convenient way of exploring complex MongoDB collections without sacrificing performance.
Show Embedded Fields
In the old Table View, it was impossible to view nested fields with the rest of the table. Users had to step into and out of embedded objects (or cells/columns) one at a time to explore deeper JSON paths, losing the context of the nested fields within the overall data.
With the new Table View, you can expand fields and arrays right next to other columns in the table simply by right-clicking on a field and choosing Show Embedded Fields.
You can also show and hide all embedded fields in one click. Simply right-click any field and choose Show (or Hide) All Embedded Fields.
Track Which Fields You’ve Expanded
An improvement we’ve added in Studio 3T 5.7.2 is a much better way of seeing which columns or fields you’ve expanded. Now, when you show embedded fields, the parent field will show a dot right before it, indicating that its nested fields have been expanded.
To make navigating data even easier, each nested field will also show its complete JSON path, so you’re always aware of a field’s context within the overall data set.
For example, let’s show the embedded fields of the parent field: response.
You’ll see a dot appear right before the field name once its expanded. The embedded fields metadata and results will also show the complete JSON paths
Let’s now show the embedded fields of the field metadata. Once expanded, it will also be marked by a dot and its only embedded field – provider – will show the JSON path
response.metadata.provider, which reflects its hierarchy within the data.
In addition to these visual indicators, we’ve also designed the breadcrumbs to be responsive, so hidden columns and expanded fields are easier to track.
Step Into Array-Valued Columns
Up until now, it was only possible to step into arrays individually. We finally were able to remove this limitation.
You can now step into a whole column of arrays at the same time, which means array elements will be displayed with increasing index on a single line, each line representing another array.
Thanks to the newly introduced column pagination, views with a lot of columns (in this case a lot of array elements) will no longer cause performance issues.
Let’s take a look at the example field sentences, which contains 108 array elements. To step into this array-valued column, just right-click on the field and select Step Into Column.
This will then show all the array elements for all the documents (in this example, words starting with a), instead of just one individual document. It also neatly displays the 108 array elements in individual, clearly numbered columns.
To return to the previous view, simply right-click and choose Step Out.
The Show Embedded Fields and the Step Into functionalities are undeniably handy, but they could easily result in columns that might clutter your view.
The good news is, the new Table View supports hiding columns with a simple right-click or a quick keyboard shortcut – just like one would in Excel – so you don’t have to fiddle with the MongoDB
$projection operator. Hidden columns are always visually indicated as collapsed columns.
Restore Default View
So now that you’ve expanded nested arrays, shown embedded fields, hidden columns, and changed column widths, what if you want to revert to the default view, as you had it when you first opened your collection?
We made this handy, too. We introduced a Restore Default View option with Studio 3T 5.7.2, so all you need to do is right-click on any column, choose Restore Default View, and it will show your collection as you had it from the start, standard column widths and all.
Hotkeys and Other Settings
If you don’t revert to the default view, settings like hidden columns, column widths, and expanded embedded fields are saved between app restarts, so you’re spared this time-consuming task.
You can even shave a few more seconds off through these handy shortcuts:
- Ctrl + Enter to show and hide embedded fields
- Ctrl + T to hide and show columns
- Enter to step into columns
- Shift + Enter to step into cells
You can find the complete list of Studio 3T hotkeys here.
Studio 3T’s Table View is a game changer for MongoDB professionals and newcomers alike.
For MongoDB users working with large datasets, the ability to show embedded fields in as many individual columns (think thousands), makes MongoDB data exploration much quicker and easier. Now users can also view the fields they need side-by-side, whether it’s embedded or not, which makes data visualization simpler all around.
For newcomers to MongoDB from relational databases, the ability to view data in a table already bridges a huge gap. With the improved table view, they can easily navigate their way around MongoDB instead of wrangling command lines in the mongo shell. A massive leg up, especially as newcomers learn the ropes of the MongoDB query language.
Try Table View now, available in all three Studio 3T editions: