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. 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/functions are supplied for defining and managing deletion rules. If you want a job to be scheduled to run automatically, you can automate it.
Procedures/functions 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.
If you are using IBM Db2 or Microsoft SQL Server, you can use their built-in agents to configure the schedule for deletion-by-rule job creation according to your requirements. 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.
With Db2, use the Db2 administrative task scheduler.
With SQL Server, you need the SQL Server Agent to be running.
Note: For more information, see Installing a database.
If you are using PostgreSQL, which does not have its own scheduling agent, you'll need to use a third-party tool such as pg_cron to create deletion schedules.