2

We have a usecase that needs On-Demand Materialized Views, that does automatic update in the view, so our analytics dashboard can be faster. This feature is available in Atlas Mongo, not sure it is available in Azure.

Azure do provide materialized view for "Cosmos DB for No SQL API"

Karthikeyan VK
  • 5,310
  • 3
  • 37
  • 50
  • Actually, MongoDB DOES NOT automatic update Materialized Views, that's why it calls "On-Demand" Materialized View, it should be executed manually / on demand. – Valijon Aug 05 '23 at 10:09
  • does it have the option, we are ok to have a az function to run the update. Need to know $merge does work or not in aggregate, for more info https://www.mongodb.com/docs/manual/core/materialized-views/ – Karthikeyan VK Aug 09 '23 at 01:53

1 Answers1

0

Have you also looked at the Change Feed functionality in cosmos db? Its also available for mongo db:

https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/change-streams

Change Feed captures changes made to your data in the order they occur. These changes can be insert, update or delete

Set up a process that reads from the Change Feed and applies these changes to your MV. This process can be running on a scheduled basis or triggered by events, in your case, you can use a function here.

This is slightly different than the approach you want with on demand MV though.

P.S. For change streams API, you need version 3.6 or higher.