Data Model

Sample Kafka Event

{
  "eid": "BE_JOB_REQUEST",
  "ets": 1669196680963,
  "mid": "LP.1669196680963.0e6ac196-e57d-40bb-ab39-f5ec479da3e6",
  "actor": {
    "id": "Sunbird Flink Job",
    "type": "System"
  },
  "context": {
    "pdata": {
      "ver": "1.0",
      "id": "org.sunbird.platform"
    },
    "channel": "01309282781705830427",
    "env": "sunbirdstaging"
  },
  "object": {
    "ver": "1669196652993",
    "id": "02c4e0dc-3e25-4f7d-b811-242c73e24a01"
  },
  "edata": {
    "action": "delete-user",
    "iteration": 1,
    "userId": "5deed393-6e04-449a-b98d-7f0fbf88f22e",
    "organisationId": "01309282781705830427"
  }
}

Mongo DB Update Logic

The following collections from the database ml-service will be updated in order to fully remove user PII data from mongoDB.

  • observations

  • surveySubmissions

  • observationSubmissions

  • projects

  • programUsers

  • solutions

Observations

The following table fields from the observation collection will be updated when createdBy key in observation collection is equal to the Kafka event userId.

surveySubmissions

The following table fields from the surveySubmissions collection will be updated when createdBy key in surveySubmissions collection is equal to the Kafka event userId.

projects

The following table fields from the projects collection will be updated when userId key in projects collection is equal to the Kafka event userId.

programUsers

The following table fields from the programUsers collection will be updated when userId key in programUsers collection is equal to the Kafka event userId.

Table fields

solutions

The following fields from the solutions collection will be updated when author key in solutions collection is equal to the Kafka event userId.

observationSubmissions

The following fields from the observationSubmissions collection will be updated when createdBy key in observation collection is equal to the Kafka event userId.

Last updated