It is imperative that you understand that the order in which the rules are applied can significantly impact on the expected results. The following logic is used to handle rule order processing. The specified Capture Process will go and look for any possible data that meets the first of the configured rules, to apply. In the case where there is more than one rule to be processed, the rule which will “take precedence“ will be the rule which best fulfills the data found. If the objects found match the criteria given in the first rule to be processed any subsequent rules will be ignored because the previous criteria have been met.
The logic used in transformation does not necessarily follow the rules for human logic, in that, the least significant amount of data to be processed should be the first rule, and the rule which affects the largest amount of data should be the last rule. In this way the user will be able to apply the requirements of the transform in the desired way.
The following example demonstrates this program logic. Assume that you need to rename all tables in the dbo schema having a name starting with emp into the schema hr and keep the original table name. Another requirement is to rename the ident columns to be the id for any tables in the dbo schema, in the case where we have an employee table that contains the ident column, this matches both rules. The examples demonstrate the replication behavior depending on the order that the rules are presented:
map=1,rule=(dbo.emp%:hr.emp%),description="sample 1"
map=2,rule=(dbo.%.ident:dbo.%.id),description="sample 2"
map=1,rule=(dbo.%.ident:dbo.%.id),description="sample 3"
map=2,rule=(dbo.emp%:hr.emp%),description="sample 4"
map=1,rule=(dbo.emp%.ident:hr.emp%.id)
map=2,rule=(dbo.emp%:hr.emp%)
map=3,rule=(dbo.%.ident:dbo.%.id)
Next page:
7.5 Alter Capture Process