We are currently looking to migrate from Sql to CosmosDb(DocumentDb). To use the advantages of CosmosDb, we had to denormalize the data. However, there are cases where we still need to update the related tables if data in the original table changes. To achieve this, we are planning to use Change Feed to propagate any changes to the related table.
For ex: Consider a scenario with two collections
1) User Collection
keys/columns per document : id, name, displayName
2) Post Collection
keys/columns per document: id, userDisplayName, userid
Lets assume that one of the documents in user collection has its displayName changed. We need to update all the documents from post collection with that displayName to keep Post collection up to date (Cost to be paid for denormalizing)
We can process all the documents from post collection matching the displayName of the changed user document. If there are other keys in user document that changes frequently, processing all the posts for that user is expensive and unnecessary if that column is not even a part of the Post document.
I couldn't find any information on Change Feed providing information on what columns changed. If not, do I have to bear this cost or is there a better way to design ?