N
N
Nyppy2019-10-23 10:40:37
Python
Nyppy, 2019-10-23 10:40:37

How to find out about data changes in the Mongodb database?

Hello everyone, there is a Mongodb database, as soon as some kind of database change occurs (delete, write, change ..) get the changed data. That is, viewing changes in real time or almost.
I am working on Python 3.7. How to do this, tell me, the second day I'm sitting on this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Shatokhin, 2019-10-23
@Nyppy

There are also Change Streams
Examples for python are in the documentation

F
Frozen Coder, 2019-10-23
@frozen_coder

As an option to read the oplog
The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases.
Google in this direction, I suppose there are already ready-made parsers for this oplog.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question