[Net 2000 Ltd. Home][DataBee Home][DataBee Manual][DataBee FAQ]

DataBee Truncate Manager Rules

During the execution of a loader set, the target tables will be populated by inserting the extracted rows into each table. These rows will form a referentially correct and complete (as specified by the extraction rules) collection of subset data. All of the foreign keys will enable, the primary keys will be valid and there will be no duplicate rows. However, the Set Loader application cannot guarantee that the schema data is referentially correct if data rows are already present in the tables to be loaded. This means that each and every table to be loaded with subset data must be empty before the load process begins. The fastest way to ensure that no rows are present in a table is to perform a truncate operation on it.

A Truncate Manager rule is a container which manages the execution of a number of subsidiary actions which perform the truncation operations on a table. A Truncate Manager rule can be defined in a loader set to automate the table truncation process and this rule is usually automatically generated when a loader set is created by the New Loader Set Wizard.

The implementation of the table truncation operations as a manager rule was done to make the process simple and intuitive. An Oracle schema can have many tables and each truncate action requires the execution of a distinct SQL statement. Each operation must be recorded in the log and any errors must be detected and reported. If such actions were configured as individual rules in the loader set, then the large quantity of such rules could visually overwhelm the loader set - leaving it hard to maintain the other load rules. It is much more efficient to collect all of the actions together under one rule which acts as a manager. The Truncate Manager Rule form provides the ability to view, configure and manage the table truncation actions and the Truncate Manager rule itself controls the execution of the configured table truncation operations. Errors and statistics are handled by the Truncate Manager rule and presented in a manageable summary form.

It is possible to configure the Truncate Manager to ignore a certain number (or all) of the errors received while processing the truncate 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 loader set. In other words, even if errors are ignored, any errors which occur during the table 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: The Truncate Manager rule is only aware of the tables given to it by the Rule Controller. 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 from the target schema. Once the Rule Controller has been updated, use the Refresh Table List button on the Truncate Manager Rule form to refresh the table list inside the Truncate Manager rule.

Once the Truncate Manager rule has begun to execute, the table truncation operations will proceed in parallel using the full number of threads specified on the Set Loader Run Statistics tab until all specified tables have been operated on.

Truncate Manager rules are usually configured using Rule Blocks to run after the foreign keys have been disabled by a Foreign Key Manager rule. This ensures that the tables can be truncated in any order without generating spurious Foreign Key violation errors.

Truncate Manager rules are created by launching the New Truncate Manager rule form using the New Loader Rule button located on the bottom right of the main Set Designer form.

How to Create a New Truncate Manager rule


[Net 2000 Ltd. Home][DataBee Home][DataBee Manual][DataBee FAQ]