Scans

The following information introduces a scan and explains how to configure it for your MongoDB instance.

What is a scan?

Scans analyze documents in your collection and offer a detailed look into the consistency of your data by pinpointing fields and the variance of types in them.

Configuration options

To configure a scan:

  1. Select your MongoDB instance from the ObjectRocket UI.
  2. Select Schedule scan. The following fields display:
  • Source Database: The source database where the collection resides. Choosing a database populates source collections with all available collections. This field is required.
  • Source Collection: The source collection to scan. The options come from the available collections in the specified database. This field is required.
  • Max Depth: This is the number of sub-docs deep to scan. By default, this option is 0, which recursively traverses and scans all documents in the collection. If you have a very deeply nested object structure, consider changing this value to limit the documents to scan. This field is required.
  • Limit: This option limits the number of documents to scan. If you have a large collection, this option is useful to speed up your scan and drill down to only the data you care about. By default, unless you apply a sort, this analyzes the newest documents in the collection up to that limit. This field is required.
  • Query: This option lets you analyze a subset of documents. This option takes a standard Mongo query object and filters the documents before scanning. This field isn’t required and doesn’t filter any documents if not provided.
query = {'someValue':true}
  • Sort: This option lets you scan documents in an order other than creation order. This option takes a standard Mongo sort and, if not supplied, sorts based on creation order. This field isn’t required.
sort = { updated_at : -1 }
  • SlaveOk: This lets the scan read from secondary if necessary.

If you have any further questions about scans, contact support@objectrocket.com.