Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-639

Finer-grained updates from aggregation via $merge

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None

      Epic Summary

      Summary

      Enable new kinds of updates by exposing aggregation expressions in a command which performs updates.

      Motivation

      This improvement will be useful to implement custom logic to merge conflicting documents during an aggregation outputting to an existing collection. This was originally part of PM-828, but moved out of scope. For example:

      • Incrementally add counts to a rollup summary table which was previously computed. Imagine a collection 'events.monthly_summaries' which holds one document per month summarizing all events hosted within the month. After each event, you wish to increment the total number of registrations for the current month without changing any of the other statistics for that month.
      • Maintain a single view of a customer after ingesting updates from other collections or systems. Once a week, you wish to scrape all new customer interactions for any updated contact info and save/merge that info into a collection which represents all known contact info for a customer. Specifically, you may want to add any new addresses to a set of known addresses.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ian@mongodb.com Ian Whalen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: