Update Persister Configuration
Last updated
Was this helpful?
Update persister configuration -
If you add, remove, or rename a field in the CMS request payload (service or address).
If you want new data to be saved to the database.
Field added/removed/renamed in the request payload (e.g., service, address).
New data needs to be persisted to the DB (e.g., a new column added).
The database schema is modified (e.g., table changes, new columns).
New nested objects/entities are introduced in the payload.
Audit logs or Elasticsearch indexing is added via Persister.
Data won’t be saved.
DB errors may occur.
UI or search APIs may break due to missing data.
💡 Always ensure JSONPaths in
persister.yamlmatch your latest payload and DB structure.
Configuration File
File: egov-persister/pgr-services-persister.yml
This file maps fields from Kafka topics (like save-pgr-request) to DB tables (like eg_pgr_service_v2).
Find the section: fromTopic: update-pgr-request
In the UPDATE query (for either service or address):
Add your new column (e.g., priority=?)
Add a jsonPath for the field (e.g., - jsonPath: $.service.priority)
Tip: If the field is in an address, use the right table and path (e.g., $.service.address.priority).
1️⃣ Update save-pgr-request
Map new fields for INSERT
For DB inserts
2️⃣ Update update-pgr-request
Map new fields for UPDATE
For DB updates
3️⃣ Restart persister
Reload updated YAML config
To apply changes
Last updated
Was this helpful?
Was this helpful?
- query: INSERT INTO eg_pgr_service_v2(..., priority) VALUES (..., ?);
...
jsonMaps:
...
- jsonPath: $.service.prioritykubectl rollout restart deployment egov-persister