Docs Menu

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:

1
use Database0
2

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)
←  Connect to Your Federated Database InstanceManage Atlas Data Lake Pipeline →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.