Docs Menu
Docs Home
/ /
MongoDB Atlas Data Lake

Run Queries Against Your Data Lake Dataset

On this page

  • Prerequisites
  • Procedure

This page guides you through the steps for running queries in mongosh against Data Lake dataset for the sample_mflix.movies collection.

Before you run the queries, you must complete the following using the examples shown in the procedures:

use Database0

The following queries use the sample_mflix.movies collection for which you created the pipeline.

Find movie with the title The Frozen Ground released between 2010 and 2015:

db.Collection0.find({ "year": {$gt: 2010, $lt: 2015}, "title": "The Frozen Ground" }, {"title": 1, "year": 1, "genres": 1 })

Find all movies whose title includes the word Ground and limit the number of documents returned to 10.

db.Collection0.find({ "year": {$gt: 2010, $lt: 2015}, title: /Ground/ }, {"title": 1, "year": 1, "genres": 1 }).limit(10)
← Step 3: Connect to Your Federated Database Instance