Skip to content

Change streams

  • MongoDB

The change stream viewer lists changes as the server reports them: inserts, updates, replaces and deletes, with the namespace, the document key and the changed fields. You can watch one collection, one database or the whole deployment, narrow the events with a $match, and pause without losing your place.

  1. Open the viewer:
    • Watch changes on a collection or a database in the explorer,
    • Watch the whole deployment on a database,
    • or Tools › Watch in the collection view.
  2. Under Watch, check the scope: the collection, its database, or Whole deployment.
  3. Optionally, enter a $match filter or pipeline (optional), such as { operationType: 'insert' } or [{ $match: … }].
  4. Tick Full document on update to receive the whole document with each update.
  5. Choose Start. The status reads “Watching” with the scope.

Each row shows the Time, Operation, Namespace, Document key and Changed fields, newest first. Select a row to see the updated fields, the full document when there is one, and Whole event (Extended JSON). The bar above the list counts the events by operation.

Button What it does
Pause Stops receiving but keeps the resume token. Resume then delivers what changed meanwhile.
Stop Ends the stream.
Clear Empties the list.

The scope, filter and full-document setting can only be changed while the stream is not running. The list keeps the latest 1,000 events; the counts say how many older ones were dropped.

Documents Querybara 0.1.1 · built frombc9f5aa