The DataBee Create/Edit Truncate Manager Rule Form
When loading target subset databases with extracted data the tables must contain no rows prior to the data insertion. This is necessary because, while the DataBee software guarantees that a referentially correct collection of data rows will be present in the target tables, it cannot remove rows from the load process in order to compensate for data which is already present in the target table. It would be very slow and practically impossible to perform a load into a non-empty table. Consequently, any tables which are to be loaded in the target schema must be empty before the load operations begin. The fastest way to ensure a table has no rows is to perform a truncation operation on it.
The Create/Edit Truncate Manager Rule form is used to create and edit DataBee Truncate Manager rules. Truncate Manager rules are designed to manage the process of truncating the schema tables. In the example screen shot above, the form is editing an existing Truncate Manager rule. The tables in the schema which will be truncated are listed in the panel on the left hand side. Note that two tables, DTB_INVOICE_LINE_HISTORY and DTB_ITEM_X_CUSTOMER_AGG, are shown in light grey. These tables have not been marked for truncation and any data they contain will be preserved during the load process.
A Truncate Manager rule is only present in loader sets and one is usually created automatically by the Set Designer application when a new loader set is created. Truncate Manager rules can be created manually, if required, using the options on the New Loader Rule form.
A Truncate Manager rule is provided with the tables known to its Rule Controller when the rule is created. To refresh the list of tables known to the Truncate Manager rule, first refresh the tables in the Rule Controller using the Refresh Tables and Indexes button on Options tab of the edit Rule Controller form. This retrieves an up-to-date list of tables from the target schema. Once the Rule Controller has been updated, use the Refresh Table List button to refresh the list inside the Truncate Manager rule. If required, the checked or unchecked state of the tables can be saved and then restored after the refresh using the Export Current Configuration and Import Current Configuration buttons.
The Number of Truncate Operations Permitted to Fail field configures the Truncate Manager to ignore a certain number (or all) of the errors received while processing the truncation operations. This enables the Truncate Manager to continue operating even if errors occur. Be aware that ignoring the errors in the Truncate Manager just permits the Truncate Manager to complete as many operations as possible before returning an error and stopping the execution of the masking set. In other words, even if errors are ignored, any errors which occur during the truncation operations will mark the Truncate Manager rule as having failed and the error state will be reported to the DataBee software for handling once the actions have completed.
Important Note: Remember that the DataBee software is multi-threaded and that properly configured Rule Blocks are required to ensure the Truncate Manager rule runs in the appropriate order. Usually the Truncate Manager rule is configured with a rule block that runs it after the Foreign Key Manager rule has disabled the foreign keys in the schema. This enables the truncation operations to be performed in any order without generating spurious foreign key invalidation errors.
An existing Truncate Manager rule can be edited by double clicking on it with the mouse. Truncate Manager rules are created by launching the New Truncate Manager form using the New Rule button located on the lower right hand corner of the main form in the Set Designer application.
How to Create a New Truncate Manager Rule