Deleting records by rule

If you need to delete records from the Information Store for policy reasons, rather than to reflect delete operations that happened elsewhere, you can use the deletion-by-rule mechanism. You can directly delete any records that you select by specifying their property values and metadata.

Through deletion by rule, you can target records that match specific conditions and automate deletion to occur regularly. Deletion can be applied consistently across all of the records in the Information Store, whether ingested from an external source or created in i2® Analyst's Notebook Premium. You can delete records by their source, their update time, or by any of their property values.

A deletion-by-rule operation has the following components:
  • A condition specifies the particular records in the Information Store that you want to delete.
  • A rule contains the condition in a form that you can store, together with a name and information about how you want a deletion job to be created.
  • A job contains the rule and is placed in a queue to run deletion on the specified records.

For deleting records by rule, i2 Analyze provides the following procedures and views:

  • Deletion views are based on the entities and links that are defined in the i2 Analyze schema. These views are a simplified representation of the underlying data structures for composing conditions.
  • Procedures are supplied for defining and managing deletion rules. If you want a job to be scheduled to run automatically, set the rule to be automated.
  • Procedures are supplied for creating deletion jobs based on existing rules.
  • Views provide a list of deletion rules, mappings between views and schema types, and a log of deletion jobs, status, and outcomes.

The procedures and views that are associated with deletion by rule are generated automatically when you deploy an Information Store or when you upgrade from an earlier version.

You can construct an SQL query that identifies the data that is to be deleted from the Information Store. When you verify that the correct data is returned in response to the SQL query, you can use that condition to create a rule as a basis for a deletion job. You do not need to have a detailed understanding of the database structure. You do need a knowledge of the i2 Analyze schema. For more information, see the i2 Analyze data model documentation.

When you want to run a deletion job only once or irregularly, you can create it on a manual basis. You might also have deletion jobs that you want run regularly on automated basis. All automated jobs are created according to the same schedule and placed in a queue of jobs to run in order of their creation time.

Running deletion-by-rule jobs on an automated basis requires the Db2® administrative task scheduler if you are using Db2, or the SQL Server Agent to be running if you are using SQL Server. For more information, see the i2 Analyze software prerequisites. You can configure the schedule for deletion-by-rule job creation according to your requirements.