IFIX-Core Data Clean-Up v2.0

Please follow the below instructions to clean up the IFIX core data from the environment.

Druid Data Clean-up

  1. Open the druid console in the respective environment.

  2. Go to Ingestion Supervisors. And select the particular supervisor (fiscal-event)

a.) In Action, click on Terminate. This will terminate the supervisor. Wait for a minute.

3. Go to DataSources, select the particular data source name (fiscal-event). And scroll right to the Action.

a.) Click on the Mark as unused all segmentsMark as unused all segments.

b.) Click on Delete unused segments(issue kill task) and give all the permission to delete.


Once clean up completes. Please follow this instructions iFix Core Fiscal Event Post Processor v2.0 | Druid Sink to run the supervisor.

 

MongoDB Data Clean-up

 

Please follow below steps :

  1. Connect to the playground pod and run the below command to connect with mongo DB.

mongo --host <mongo-db-host>:<mongo-db-port> -u <mongo-db-username> -p <mongo-db-password>

2. Use the ifix core DB.

use <db-name>

3. Run the below command to delete all the data from fiscal_event collection.

db.fiscal_event.remove({});

4. If you want to delete all fiscal event record of particular Gram Panchayat then run the below command.

Here lets assume , we have to delete "LODHIPUR" GP(Gram Panchayat) details (that is hierarchy level 6)

from DWSS department. then run this command.

db.fiscal_event.remove({"departmentEntity.ancestry.6.name":{$eq:"LODHIPUR"}});

5. If you want to delete fiscal event record based on some other attributes , you have to write a custom

mongo delete query.

PostgresDB Data Clean-up

 

Please follow below steps :

  1. Connect to the playground pod and run the below command to connect with postgresDB.

psql -h <psql-host> -p <psql-port> -d <psql-database> -U <psql-username>

2. It will prompt for a password. Please enter the password.

3. Run the below query to delete all the data from fiscal_event_aggregated.

DELETE FROM fiscal_event_aggregated;

4. If you want to delete the particular Gram Panchayat details from fiscal event aggregated record, run the

below query.

Here lets assume, we have to delete "LODHIPUR" GP(Gram Panchayat) details (that is hierarchy level 6)

from DWSS department.

DELETE FROM fiscal_event_aggregated where departmentEntity_ancestry_6_name='LODHIPUR';

Note : If you are not sure about deleting the fiscal event aggregated record, you can delete all the record from fiscal_event_aggregated table. Once deleted all the record, either you can manually run the fiscal event aggregate Cron Job to UpSert all the records or it will UpSert the record at every mid night from Druid to Postgres.