Studio 3T Tips and Tricks

This collection of short videos is geared towards discovering ‘lesser-known’ Studio 3T features. Here you’ll find tips and tricks related to DevOps tasks such as managing MongoDB users and roles, but you’ll also learn handy tips such as color-coding tabs, keyboard shortcuts, and more.

The Studio 3T Tips and Tricks series will be periodically updated, so continue to check back for more videos!

Tips and Tricks

#1 Importing a license

To get started in Studio 3T, you need to install your new license key. To do this,

  1. Open Studio 3T and select ‘Help’ in the toolbar.
  2. Go to the ‘License Manager’ and click ‘Import New License’.
  3. Paste your license key (the entire text between both “—” lines including the “—” lines themselves) into the dialog box and hit ‘O’”.
  4. Click ‘OK’ once more after you’ve reviewed your customer information.

#2 Add a New MongoDB User

Managing your MongoDB users is a breeze in Studio 3T.

  1. Open Studio 3T and connect to a server.
  2. Right click a database and go to ‘Manage Users’.

    TIP: You can also use the ‘Users’ button in the Global Toolbar to access user information.

  3. Click ‘Add’ and give your new user a name and password.
  4. Click ‘Add User’ and your new user is setup and ready to go.

Additionally, you can edit an existing user or delete the user entirely.

#3 Manage User Roles

Creating and managing roles in MongoDB is done in the ‘Roles’ area of Studio 3T.

  1. Access ‘Roles’ by right clicking on a database in the Connection Pane, and choosing ‘Manage Roles’. 

    You can also use the ‘Roles’ button in the Global Toolbar to access user roles.

  2. Click ‘Add’ and give the role a title.
  3. Click ‘Add’ again to decide where the role will be applied and the privileges that go along with it.
  4. After clicking ‘Create Rule’ the new Role is now added to the chosen database.

#4 – Three Ways to View MongoDB Data

Once you’ve opened Studio 3T and connected to a MongoDB collection you have three ways to view your data.

 

  • JSON View – view your data as a JSON file
  • Table View – the classic “spreadsheet” format
  • Tree View – glimpse all data hierarchies at once.

#5 Save MongoDB Queries and Scripts

Save your MongoDB queries in Studio 3T.

To save a query in the Aggregation Editor, IntelliShell, or SQL:

  • Create the query in Studio 3T
  • Click the ‘save’ icon (floppy disk)
  • Give it a name and choose where to save it
  • Click ‘OK’

#6 Drop an Unused Database

Need to drop a database?


Dropping a database can be done in two different ways:

  • Select the database in the Connection Pane
  • Go to the ‘Database’ tabat the top of the Global Toolbar
  • Click “Drop Database”

Alternatively…

  • Right click the database in the Connection Pane
  • And choose “Drop Database”

#7 Dropping a Collection

Clean up your Connection Pane by dropping unnecessary collections.


You can drop collections by:

  • Right clicking the collection in the Connection Pane
  • Then selecting “Drop Collection”

Similarly…

  • Highlight the collection you want to drop
  • Select the “Collection” tab at the top of the Global Toolbar
  • And click ‘Drop Collection’.

#8 Personalize Studio 3T

Want to change the font or choose which mongodb executables to use?

You’ll find those options and much more by going to

  • ‘Edit’
  • then clicking ‘Preferences’.

Here you’re able to change default settings, specify the font size, toggle on/off auto-completion, and much more!

#9 Load MongoDB Queries

Save time when querying by loading your MongoDB queries.

  • Go to IntelliShell, SQL, or the Aggregation Editor
  • Select the ‘Open Folder” icon and click ‘Ok’.

Now that your query’s been loaded, run the query and explore your data!

#10 View Multiple MongoDB Collections

Want to look at your test and production data-sets simultaneously?

  • You can click and drag the Collection Tab to open your data in a new window.
  • Alternatively, you can right-click the Collection Tab and choose to split them horizontally, vertically, or un-docked.

#11 – Collapse the Connection Pane

Free up just a little bit of screen space by collapsing your currently open connections.

After successfully connecting to a Mongo database, you will find that connection open in the Connection Pane.

  • To collapse (or expand) the Connection Pane, click the green arrow.

#12 View & Edit JSON Documents

Use JSON to look at individual documents.

You can open the Document JSON Viewer via:

  •  the F3 shortcut
  • click the “View” document button
  • or right-click, ‘View Document, ‘Document’.

To quickly edit documents in JSON

  • use ‘CTRL+J’

#13 Retain Your Results

Retain your previous results.

You can toggle on and off this feature, allowing you to view only your current results OR all previous results.

  • Open a collection in IntelliShell or the Aggregation Editor.
  • In the collection toolbar, click the ‘Retain previous results tabs’ button to toggle this on/off.
    • Or use the shortcut – ALT+SHIFT+P

#14 Raw Shell Mode

While Studio 3T does offer the IntelliShell – a full-blown mongo shell with auto-completion, Visual Query Builder, and more – you can also work in ‘Raw Shell Mode’.


Toggling on the Raw Shell will display query results in typical mongo shell format. To turn this on or off:

  • Click on the shell icon in the toolbar

#15 Export Query Results via the $out Operator

By using the Aggregation Editor and an $out Operator, you can export query results in Studio 3T.

All you need to do is:

  • Create a query in Studio 3T via SQL, the Aggregation Editor, the IntelliShell, or Visual Query Builder
  • Copy your query into the first stage of the Aggregation Editor.
  • Add a second stage in the Aggregation Editor and give a name to the “output-collection”
  • Refresh your database
  • Right click your new collection and begin to export your query’s results (formats include: to another collection, a mongodump, or as SQL, CSV, and JSON files)

Go more in-depth with our Import/Export Feature!

#16 – Creating MongoDB Views

A view lets you pre-specify a query so that you can quickly view and share it’s results. (Read more about SQL Views in MongoDB here)

To create a view:

  • Right click on the desired collection in the Connection Pane and select, “Add View Here”.
  • This will open the View Editor where you can modify your query as desired.
  • Once the query is set, click “Create View” and you’re new view is now in the Connection Pane

#17 Color Code MongoDB Collections

To begin color coding your MongoDB connections in Studio 3T, you can:

  • Right click the server, database, or collection in the Connection Pane.
  • Highlight ‘Choose Color’.
  • And click on the desired color.

Similarly, if you have a few collections open:

  • Right click the Collection’s Tab
  • Highlight ‘Choose Color’.
  • And pick the color from there.

#18 View Embedded MongoDB Fields

Stop jumping in and out of cells to see nested fields.


Simply:

  • Right Click
  • Go to ‘Show All Embedded Fields’

#19 Validate JSON Documents in JSON View

Ensure you’ve input JSON correctly with the ‘Validate JSON’ feature.

In JSON View, you can edit your JSON Documents by:

  • Accessing the ‘Document JSON Editor’ from the Collection Toolbar or using the shortcut “CTRL + J”
  • Input your JSON and click ‘Validate’ to ensure all edits have been added correctly before clicking ‘Update’.

#20 Access the JSON Editor in Table and Tree View

Prefer to edit an entire JSON document all at once?

When in Table or Tree View, right click a cell and go to ‘Document’  –> ‘Edit Document’. This will open the ‘Document JSON Editor’ and let you make changes to the entire JSON document.

Updated on February 12, 2019

Was this article helpful?