All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
The objective of the national-dashboard-ingest service is listed below -
To provide a one-stop framework for ingesting data regardless of the data source based on configuration.
To create provision for ingesting based on module-wise requirements which directly or indirectly requires aggregated data ingestion functionality.
Prior Knowledge of Java/J2EE
Prior Knowledge of SpringBoot
Prior Knowledge of PostgresSQL
Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.
Prior Knowledge of ElasticSearch
Step 1: Define the index name for the module as per your requirement in module.index.mapping
key present in the configuration here - DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps .
Step 2: Define the allowed metrics for the module as per your requirement in module.fields.mapping
key present in the configuration here - DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps
Step 6: Create Kafka connectors for all the modules that have been configured. A sample request for creating a trade license national dashboard Kafka connector is as follows -
Step 7: Run the national-dashboard-ingest application along with the national-dashboard-ingest-kafka-pipeline.
Definitions
Config file - A YAML (xyz.yml) file which contains configuration for running national dashboard ingest.
API - A REST endpoint to post data based on the configuration.
Functionality
When national dashboard ingest metrics API is hit, all the data payload lookup keys are first checked against the db to determine whether they already exist or not. The db table currently being used for storing lookup keys is nss-ingest-data
.
If the record for a given date and area details is not present, the payload is then flattened and pushed to nss-ingest-keydata
topic.
National dashboard ingest kafka pipeline consumer listens on nss-ingest-keydata
topic and according to the module to which the data belongs to, pushes it to the respective topic defined in the module.index.mapping
key.
Once the national dashboard ingest kafka pipeline pushes data to the respective topic, a kafka-connector then takes the flattened records from that topic and ingests to ElasticSearch.
Add configs for different modules required for National Dashboard Ingest Service and National Dashboard Kafka Pipeline service.
Deploy the latest version of National Dashboard Ingest and National dashboard kafka pipeline service.
Add Role-Action mapping for API’s.
The national dashboard service is used to push aggregated data present in systems and persisting them onto elasticsearch on top of which dashboards are built for visualizing and analyzing data.
Can perform service-specific business logic without impacting the other module.
In the future, if we want to expose the application to citizens then it can be done easily.
To integrate the host of national-dashboard-ingest-service module should be overwritten in the helm chart.
national-dashboard/metric/_ingest
should be added as the search endpoint for the config added.
national-dashboard/masterdata/_ingest
should be added as the search endpoint for the config added.
URI: The format of the ingest API to be used to ingest data using national-dashboard-ingest is as follows: national-dashboard/metric/_ingest
Example Ingest Request Body -