Read from Oplog

I am looking to read from local.oplog

This is a cluster deployment with a replicaSet.
I am unable to connect or create a user that can read from local.

How do you create a user that has read access to local.oplog

The project is to populate a real time data warehouse by reading the oplog

How you are creating the user?Atlas or command line

Please check these links

Hi @Anantha_Rao, welcome to the MongoDB community.

Aside from @Ramachandra_Tummala’s questions, I would also like to point out that the oplog is for MongoDB internal use, and so there’s no guarantee that the format would stay the same from version to version.

Instead, I would encourage you to use Change Streams which is overall a better method than tailing the oplog. Some advantages of change streams are:

  1. It is supported and so the format would be documented.
  2. It can be opened within a collection, database, or whole deployment level (e.g. it will work for a sharded cluster, where oplog tailing would not).
  3. Output of the change stream can be filtered and manipulated using the aggregation framework.
  4. Can be resumed from a known point in time.

Best regards,