iFIX Core Data Cleanup

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

Druid Data Clean-up

  1. Open the druid console to 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 till 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 the clean up completes, follow the instructions in this link IFIX Fiscal Event Post Processor | Druid-Sink to run the supervisor.

MongoDB Data Clean-up

Please follow the 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 ifix_dev_db

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 let us assume, we have to delete "LODHIPUR" GP(Gram Panchayat) details (that is hierarchy level 6) from DWSS department. then run this command.

1db.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 the 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.

1DELETE 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 let us assume, we have to delete "LODHIPUR" GP(Gram Panchayat) details (that is hierarchy level 6) from the DWSS department.

1DELETE 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 records from the fiscal_event_aggregated table. Once deleted all the records, either you can manually run the fiscal event aggregate Cron Job to UpSert all the records or it will UpSert the record every mid night from Druid to Postgres.

Last updated

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