DIGIT Urban
PlatformDomainsAcademyDesign SystemFeedback
v2.2
v2.2
  • DIGIT
  • Training Event
  • What’s New in DIGIT 2.2?
  • DIGIT Architecture
  • Product & Modules
    • Brochures
    • User Manuals
      • Logging Into DIGIT
      • Building Plan Approval (BPA)
        • Citizen User Manual
        • Employee User Manual
      • Trade License
        • Citizen User Manual
        • Employee User Manual
      • Public Grievance & Redressal
        • Citizen User Manual
        • Employee User Manual
        • Complaint Types List
      • Property Tax
        • Citizen User Manual
        • Employee User Manual
      • Water & Sewerage
        • Citizen User Manual
        • Employee User Manual
      • mCollect
        • Citizen User Manual
        • Employee User Manual
    • Services Overview
      • Core Services
        • Workflow Services
        • Location Services
        • User Services
        • Access Control Services
        • PDF Generation Service
        • MDMS (Master Data Management Service)
        • Payment Gateway Service
        • User Session Management In DIGIT
        • Indexer Service
        • URL Shortening Service
      • Business Service
      • Municipal Service
        • PGR Services 2.0
          • PGR Migration
        • Trade-License Service
        • BPA Service
          • BPA Service Setup and Configuration
          • BPA Calculator Service
          • Land Services
          • Noc Services
      • Utilities
    • Release Notes DIGIT 2.2
      • Configuration Changes
      • Trade License 2.2 Technical Release Notes
      • EDCR DIGIT 2.2 Release Notes
      • Property Tax 2.2 Release Notes
      • PGR 2.2 Technical Release Notes
      • Water & Sewerage 2.2 Release Notes
      • HRMS 2.2 Release Notes
      • PGR 2.2 Release Notes
    • DIGIT Roadmap
    • Product FAQs
    • Quality Assurance
  • Configure DIGIT
    • Git Repos
    • Setting up DIGIT
      • Configuring InfraOps
      • Setting up DIGIT Environment
      • Email And SMS Setup
      • FileStore Setup
      • Setting Up SSL Certificate
      • Periodic Log Cleanup
    • Setting up Master Data
      • MDMS Overview
      • Configuring Tenants
      • Configuring Master Data
      • Adding New Master
      • State Level Vs City Level Master
    • Master Data Collection Templates
      • Environment Setup
        • State Level Setup
          • Tenants Information
          • SMS Account Configuration
          • Email Account Configuration
          • Google Play Store Account
          • Payment Gateway Configuration
          • POS Integration Configuration
          • Domain Name Configuration
          • SSL Configuration
          • ULB Departments
          • ULB Designations
          • Localization
          • Google Map Configuration
        • ULB Level Setup
          • Boundary Hierarchies
          • Boundary Data
          • Cross Hierarchy Mapping
          • ULB Bank Accounts
      • Module Setup
        • Trade Licenses Templates
          • Trade Category
          • Trade Type
          • Trade Sub Type
          • Trade License Fee
          • Trade License Documents Attachment
          • Structure Type
          • Structure Sub Type
        • Property Tax Data Templates
          • Road Type
          • Construction Type
          • Property Type
          • Property Sub Type
          • Usage Category Major
          • Usage Category Minor
          • Usage Category Sub Minor
          • Usage Category Detail
          • Ownership Category
          • Ownership Sub Category
          • Owner Special Category
          • Special Category Documents
          • Unit Rates
          • Tax Rates
          • Interest Rates
          • Penalty Rates
          • Rebate Rates
          • Mutation Fee
        • PGR Data Templates
          • Grievance Type
          • Grievance Sub Type
          • Routing Matrix
          • Escalation Matrix
        • Fire NOC Data Templates
          • Building Usage Type
          • Building Sub Usage Type
          • Fire Station Master
          • Areas Served Master
          • Fire Station Mapping
          • Fire NOC Fee
        • mCollect Data Templates
          • Service Category
          • Service Sub Category
          • Service Sub Category GL Code Mapping
        • Web Portals Templates
          • State Portal
          • ULB Portal
        • OBPAS Data Templates
          • List Of Services
          • Service-Wise Documents
          • Building Occupancy
          • Building Sub Occupancy
          • Building Usage
          • Inspection Checklist
          • Stakeholders Type
          • Town Planning Schemes
          • NOC Departments
          • Fee Structure
          • eDCR Drawing
        • HRMS Data Templates
          • User Roles
          • System Users
        • Finance Data Templates
          • Chart Of Accounts
          • Funds
          • Functions
          • Contractors
          • Suppliers
          • Schemes
          • Sub Schemes
          • Bank
          • Bank Branch
          • Bank Account
          • Deductions
          • Opening Balances
          • Sub Ledger Category
          • Sub Ledger Master
        • Water Charges Data Templates
          • Pipe Size Types
          • Water Source Types
          • Water Rates (Metered)
          • Water Rates (Non-Metered)
          • Water Penalty Rates
          • Water Interest Rates
        • Sewerage Charges Data Templates
          • Sewerage Rates
          • Sewerage Penalty Rates
          • Sewerage Interest Rates
        • Billing And Payments Data Templates
          • Tax Heads
          • Receipt Format
          • Demand Bill Format
        • DSS Data Templates
          • KPI Acceptance
        • Workflow Data Templates
          • Workflow Actions
          • Workflow Levels
          • Workflow Process
          • Workflow Notifications
        • Common Configuration Details
          • Standard Document List
          • Service Document Mapping
          • Checklist
          • Configuring Data FAQs
    • Configuring Workflows
      • Setting Up Workflows
      • Configuring Workflows For An Entity
    • Configuring Services
      • API Dos and Don'ts
      • Setting Up Service Locally
      • Configuring New Reports
        • Types Of Reports Used In Report Service
        • Impact Of Heavy Reports On Platform
      • Customizing PDF Notices And Certificates
        • Integration Of PDF In UI For Download And Print PDF
        • Customizing PDF Receipts & Certificates
    • Persister Configuration
    • Indexer Configuration
    • Setting up a Language
      • Adding New Language
      • Setting Up Default Language For SMS & Emails
    • Configuring Localization
      • Setup Base Product Localization
      • Configure SMS and Email
    • Setting Up SMS Gateway
      • Using The Generic GET & POST SMS Gateway Interface
    • Configuration FAQs
    • Setting Up eDCR Service
    • Adding Roles To System
    • Mapping Roles With APIs
    • DSS Configuration And Setup
      • Building New Dashboards
    • Setting Up Finance Service
    • Adding New APIs For Access
    • Deployment Of App on Play Store
  • Customize DIGIT
    • Frontend/UI
    • DIGIT Customization
      • API Do's & Don'ts
      • Writing A New Customer
      • Enhancing Existing Service
    • Services
      • Core Services
      • Business Services
      • Municipal Services
      • Infra Services
    • Master & Configuration data load kit
    • Data Migration
      • Data Migration Principles
      • Data Templates
      • Data Migration Kit
  • Deployment Tools
    • Setup DIGIT
      • Infra Requirements
      • Infra Best Practices
      • Operational Best practices
      • Why Kubernetes for DIGIT
      • Supported Clouds
        • Google Cloud
        • Azure
        • AWS
        • VSphere
        • SDC
        • NIC
      • Infra Sizing
      • Deployment Architecture
      • Deploy DIGIT
        • Routing Traffic
        • Backbone Deployment
    • Skills Needed
    • Resource Requests & Limits
    • Readiness & Liveness
    • Troubleshooting
      • Distributed Tracing
      • Logging
      • Monitoring & Alerts
    • CI/CD
    • Security Practices
  • DIGIT Training Materials
    • Training Calendar
    • Training Videos
  • DIGIT Support
    • eGov Enablement Support for DIGIT
    • Troubleshooting Guide
Powered by GitBook

​All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page

Was this helpful?

Export as PDF
  1. Configure DIGIT

Persister Configuration

Persister Service persists data in the database in a sync manner providing very low latency. The queries which have to be used to insert/update data in the database are written in yaml file. The values which have to be inserted are extracted from the json using jsonPaths defined in the same yaml configuration. Below is a sample configuration which inserts data in a couple of tables.

serviceMaps:
  serviceName: pgr-services
  mappings:
  - version: 1.0
    description: Persists pgr service request in tables
    fromTopic: save-pgr-request
    isTransaction: true
    queryMaps:

    - query: INSERT INTO eg_pgr_service_v2(id, tenantid,  additionaldetails, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?);
      basePath: service
      jsonMaps:
      - jsonPath: $.service.id

      - jsonPath: $.service.tenantId

      - jsonPath: $.service.additionalDetail
        type: JSON
        dbType: JSONB

      - jsonPath: $.service.auditDetails.createdBy

      - jsonPath: $.service.auditDetails.createdTime

      - jsonPath: $.service.auditDetails.lastModifiedBy

      - jsonPath: $.service.auditDetails.lastModifiedTime

    - query: INSERT INTO eg_pgr_address_v2(id, tenantid, parentid, doorno, plotno, buildingname, street, landmark, city, pincode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
      basePath: service.address
      jsonMaps:
      - jsonPath: $.service.address.id

      - jsonPath: $.service.address.tenantId

      - jsonPath: $.service.id

      - jsonPath: $.service.address.doorNo

      - jsonPath: $.service.address.plotNo

      - jsonPath: $.service.address.buildingName

      - jsonPath: $.service.address.street

      - jsonPath: $.service.address.landmark

      - jsonPath: $.service.address.city

      - jsonPath: $.service.address.pincode

The above configuration is used to insert data published on the kafka topic save-pgr-request in the tables eg_pgr_service_v2 and eg_pgr_address_v2. Similarly, the configuration can be written to update data. Following is a sample configuration:

 - version: 1.0
    description: Updates pgr service request in tables
    fromTopic: update-pgr-request
    isTransaction: true
    queryMaps:

    - query: UPDATE eg_pgr_service_v2 SET servicecode=?,additionaldetails=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=?;
      basePath: service
      jsonMaps:
      - jsonPath: $.service.serviceCode

      - jsonPath: $.service.additionalDetail
        type: JSON
        dbType: JSONB

      - jsonPath: $.service.auditDetails.lastModifiedBy

      - jsonPath: $.service.auditDetails.lastModifiedTime

      - jsonPath: $.service.id


    - query: UPDATE eg_pgr_address_v2 SET doorno=?, plotno=?, buildingname=?, street=?, landmark=?, city=?, pincode=? WHERE id=?;
      basePath: service.address
      jsonMaps:

      - jsonPath: $.service.address.doorNo

      - jsonPath: $.service.address.plotNo

      - jsonPath: $.service.address.buildingName

      - jsonPath: $.service.address.street

      - jsonPath: $.service.address.landmark

      - jsonPath: $.service.address.city

      - jsonPath: $.service.address.pincode

      - jsonPath: $.service.address.id

The above configuration is used to update the data in tables. Similarly, the upsert operation can be done using ON CONFLICT() function in psql. Following table describe each field in the configuration.

Variable Name

Description

serviceName

The module name to which the configuration belongs

version

Version of the config

description

Detailed description of the operations performed by the config

fromTopic

Kafka topic from which data has to be persisted in DB

isTransaction

Flag to enable/disable perform operations in Transaction fashion

query

Prepared Statements to insert/update data in DB

basePath

JsonPath of the object that has to be inserted/updated.

jsonPath

JsonPath of the fields that has to be inserted in table columns

type

Type of field

dbType

DB Type of the column in which field is to be inserted

PreviousCustomizing PDF Receipts & CertificatesNextIndexer Configuration

Last updated 4 years ago

Was this helpful?