📙
Sunbird Lern
AskDot
  • LEARN
    • Overview
    • Functional Capabilities
    • Technical Architecture
      • Technical Architecture Diagram
      • Tech Stack
    • Dependencies
    • Product Roadmap
  • USE
    • Overview
    • Release Notes
      • Release V 8.0.0 (Ongoing)
      • Release V 7.0.0
      • Release V 5.4.0
      • Release V 5.3.0
      • Release V 5.2.0
      • Release V 5.1.0
      • Release V 5.0.1
      • Release V 5.0.0
      • Release V 4.10.0
      • Release V 4.9.0
      • Release V 4.8.0
      • Release V 4.7.0
    • Developer Guide
      • USER & ORG SERVICE
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Keycloak Local setup
          • Additional Installation Dependencies:
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
              • User
              • Organisation
              • System Settings
              • Role
              • Bulk Upload Process
              • Tenant Preference
              • Cassandra Migration Version
              • User Consent
              • Email Template
              • OTP
              • Page Management (LMS Service)
              • Location
              • User Notes
              • Deprecated
          • Elastic Search
          • Redis
        • APIs
          • User Management
            • User Deletion API
            • Ownership Transfer API
          • Organisation Management
          • Location Management
          • Consent Management
          • OTP Services
          • Tenant Configurations
          • Bulk Upload
          • System Settings
          • API Management Service
          • Data Sync
          • Notification APIs
        • Flink Jobs
          • User Cache Updater
          • User Deletion Cleanup Flink Job
          • Ownership Transfer Flink Job
        • Reports
          • Standard Exhaust
            • State Admin Geo report
            • State Admin Report
          • Other Jobs
            • User Cache Indexer Job
            • Delete Users Assets Report
          • Data Products Developer Installation
            • System Requirements
            • Tech Stack
            • Installation Dependencies
            • Local installation of data-products
            • Server setup Guide
            • Installation Configuration
            • Data-product creation guide
            • Troubleshooting a data-product
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
          • System Settings
          • Email Configuration
          • SMS Configuration
          • OTP based SMS Configuration
        • Roles
          • System Roles
          • User Roles
          • RBAC
        • Dependencies
        • Keycloak on Sunbird
        • How to Guide
          • Create Organization
          • Create User
          • Add new user type & location
        • Single Sign-on with Sunbird
        • Caching and Denormalising User Metadata
          • ETLUserCacheUpdaterJob
          • UserCacheUpdaterFlinkJob
        • Unit Tests and Code Coverage
        • FAQs
      • LMS(BATCH) SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
        • Data Models
          • Cassandra
            • Data Dictionary
          • ElasticSearch
          • Redis
        • APIs
        • Flink Jobs
          • Merge User Courses
          • Relation Cache Updater
          • Activity Aggregate Updater
          • Assessment Aggregator
          • Enrolment Reconciliation
          • Collection Certificate Pre-Processor
          • Collection Certificate Generator
        • Reports
          • On-Demand Exhaust
            • Response Exhaust
            • User Info Exhaust
            • Progress Exhaust
          • Other Jobs
            • Collection Summary Job
            • Course Batch Status Updater Job
            • Cassandra Migrator Job
            • Score Metric Migration Job
            • Assessment Score Correction Job
            • Collection Reconciliation Job
            • Course Enrollment Job
            • Course Consumption Job
        • Logs, Telemetry Events
        • Configuration
          • System Configuration
          • Functional Configuration
        • Dependencies
        • Certificate Registry and Credentialing using Sunbird-RC
          • Configuring PublicKey in Sunbird-RC
          • Server Setup guide for Sunbird-RC
          • API Guide For Sunbird-RC
        • Certificate Flow
          • Certificates Creation and Configuration
        • FAQs
      • GROUPS
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
          • Redis
        • APIs
          • Create Group
        • Logs, Telemetry Events
          • UI Telemetry Events
          • Service Telemetry Events
        • Configuration
          • Functional Configurations
        • Design References
        • Dependencies
        • Unit Tests and Code Coverage
      • NOTIFICATION SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Data Dictionary
        • APIs
        • Flink Jobs
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
        • Dependencies
        • Unit Tests and Code Coverage
      • DISCUSSION FORUM
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
            • Nodebb setup
            • Discussion Middleware Setup
            • Discussion Middleware
            • Discussion forum integration with any application
            • Discussion-UI setup along with demo application.
            • Sunbird-lern portal for DF
          • Source Code
        • APIs
          • Category APIs
          • User APIs
          • Post APIs
          • Topic APIs
          • Forum APIs
        • Context Schema
        • Configurations
          • Nodebb Admin panel settings
          • Discussion MW & Nodebb System Config
        • Telemetry Events
        • Dependencies
      • ML SERVICE
        • DATA PIPELINE (Flink Jobs)
          • Program User Info
            • Component Diagram
            • Data Model
            • Folder Structure
          • Ml User Delete
            • Component Diagram
            • Data Model
            • Folder Structure
        • DATA PRODUCTS
          • Program Exhaust
            • Component Diagram
            • Folder Structure
    • Server Installation
    • Dependency setup
    • Deprecation
      • Release-5.4.0
    • Jenkins Jobs
    • Release Calendar
    • Learn More
      • Tech References
      • Telemetry Processing
      • Data Dictionary
        • Sample Data
      • Delete User Functionality
      • Asset Ownership Transfer
    • FAQs
  • Engage
    • Discuss
    • Contribute to Sunbird Lern
    • Raise an Issue
    • Contribution Guidelines
Powered by GitBook
On this page
  • Sample Kafka Event
  • DB Schema

Was this helpful?

Edit on GitHub
  1. USE
  2. Developer Guide
  3. ML SERVICE
  4. DATA PIPELINE (Flink Jobs)
  5. Program User Info

Data Model

Sample Kafka Event

{
    "_id" : "63bfa8f173f6368ebde21bbe",
    "deleted" : false,
    "programId" : "5f362b78af0a4decfa9a106f",
    "programName": "$prorgramName",
    "programExternalId": "$programExternalId",
    "requestForPIIConsent":true,
    "userRoleInformation" : {
        "role" : "HM,DEO",
        "state" : "db331a8c-b9e2-45f8-b3c0-7ec1e826b6df",
        "district" : "1dcbc362-ec4c-4559-9081-e0c2864c2931",
        "school" : "c5726207-4f9f-4f45-91f1-3e9e8e84d824"
    },
    "userId" : "ba9aa220-ff1b-4717-b6ea-ace55f04fc16",
    "appInformation" : {
        "appName" : "Diksha",
        "appVersion" : "5.2"
    },
    "userProfile": {
      "userLocations" :[
        {
          "code" : "2822",
          "name" : "ANANTAPUR",
          "id" : "2f76dcf5-e43b-4f71-a3f2-c8f19e1fce03",
          "type" : "district",
          "parentId" : "bc75cc99-9205-463e-a722-5326857838f8"
        },
        {
          "code" : "282262",
          "name" : "AGALI",
          "id" : "966c3be4-c125-467d-aaff-1eb1cd525923",
          "type" : "block",
          "parentId" : "2f76dcf5-e43b-4f71-a3f2-c8f19e1fce03"
        },
        {
          "code" : "28",
          "name" : "Andhra Pradesh",
          "id" : "bc75cc99-9205-463e-a722-5326857838f8",
          "type" : "state",
          "parentId" : null
        },
        {
          "code" : "2822620004",
          "name" : "ZPHS AGALI",
          "id" : "beb0bcf4-d7cd-4a72-8f35-be8e5b03c0d1",
          "type" : "cluster",
          "parentId" : "966c3be4-c125-467d-aaff-1eb1cd525923"
        },
        {
          "code" : "28226200816",
          "name" : "SMT PRAMEELAMMA AND SRI KGA GUPTA EM UP SCHOOL",
          "id" : "01337588247832985613211",
          "type" : "school",
          "parentId" : ""
        }
      ],
      "profileUserTypes": [
        {
           "type": "administrator",
           "subType": "hm"
        },
        {
           "type": "administrator",
           "subType": "crp"
         },
         {
            "type": "administrator",
            "subType": "chm"
         }
       ],
      "framework" : {
        "board" : [ 
          "CBSE"
        ],
        ...
      },
      ...
      "rootOrg":{
      "id": "0126796199493140480",
      "orgName": "Staging Custodian Organization"
      },
    },
    "noOfResourcesStarted": 3,
    "updatedAt" : ISODate("2023-01-12T06:30:56.829Z"),
    "createdAt" : ISODate("2023-01-12T06:30:09.476Z"),
    "__v" : 0
}

DB Schema

The schema serves as a blueprint for creating and maintaining the Cassandra database that supports the Program User Info Services data storage and retrieval operations under sunbird_programs keyspace.

An example of program_enrollment table under sunbird_programs keyspace

program_id
user_id
created_at
organisation_id
organisation_name
pii_consent_required
program_externalid
program_name
updated_at
user_locations
user_sub_type
user_type

5f362b78af0a4decfa9a106f

ba9aa220-ff1b-4717-b6ea-ace55f04f11

2022-01-12

0126796199493140480

Staging Custodian Organization

True

0126796199493140480

Staging Custodian

2023-01-12

{'block_code': '282262', 'block_id': '966c3be4-c125-467d-aaff-1eb1cd525923', 'block_name': 'AGALI', 'cluster_code': '2822620004', 'cluster_id': 'beb0bcf4-d7cd-4a72-8f35-be8e5b03c0d1', 'cluster_name': 'ZPHS AGALI', 'district_code': '2822', 'district_id': '2f76dcf5-e43b-4f71-a3f2-c8f19e1fce03', 'district_name': 'ANANTAPUR', 'school_code': '28226200816', 'school_id': '01337588247832985613211', 'school_name': 'SMT PRAMEELAMMA AND SRI KGA GUPTA EM UP SCHOOL', 'state_code': '28', 'state_id': 'bc75cc99-9205-463e-a722-5326857838f8', 'state_name': 'Andhra Pradesh'}

deo

administrator

PreviousComponent DiagramNextFolder Structure

Last updated 1 year ago

Was this helpful?