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:

  • Create an Atlas Data Lake Pipeline for the sample_mflix.movies collection

  • (For On Demand schedule only) Manually trigger Ingestion of data from your snapshot

  • Set Up a Federated Database Instance for Your Dataset for the Data Lake dataset that is a snapshot of data in the sample_mflix.movies collection

  • Connect to Your Federated Database Instance to run the queries

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)

Back

Step 3: Connect to Your Federated Database Instance

Next

Manage Data Lake Pipeline