Table of Contents

Search

  1. Preface
  2. Understanding Mapping Architect for Visio
  3. Mapping Templates
  4. Mapping Objects
  5. Mapping Template Rules
  6. Using the Import Mapping Template Wizard
  7. Using the mapgen Command Line Program
  8. Using Informatica Mapping Templates
  9. Glossary

Mapping Architect for Visio Guide

Mapping Architect for Visio Guide

Rule Order

Rule Order

You can set the order in which Mapping Architect for Visio evaluates the rules in a rule set. The order of the rules affects the list of ports for which Mapping Architect for Visio creates links. After you create the rules for a rule set, you can change the order in which you want Mapping Architect for Visio to evaluate them.
Mapping Architect for Visio evaluates the rules from top to bottom and creates one link for each port. Two rules can affect the same port. For example, a Named Port rule or a Foreign Key rule at the bottom of the rule set may override a Named Port rule at the top of the rule set.
The following table shows a sample list of starting ports for a link:
Port Name
Port Type
Datatype
ITEM_ID
Primary key
-
ITEM_NAME
-
String
ITEM_DESC
-
String
PRICE
-
Decimal
DISCONTINUED_FLAG
-
Boolean
MANUFACTURER_ID
Foreign key
-
DISTRIBUTOR_ID
Foreign key
-
Based on the example ports in Rule Order, Mapping Architect for Visio creates links for the sample rule sets.
The following table shows how Mapping Architect for Visio evaluates the rules in a rule set.
This rule set...
Creates these links...
All Ports
Named:ITEM_DESC (TO) DESCRIPTION
Named:PRICE (TO) ITEM_PRICE
DataType:decimal
ITEM_ID links to ITEM_ID
ITEM_NAME links to ITEM_NAME
ITEM_DESC links to DESCRIPTION
PRICE links to PRICE
DISCONTINUED_FLAG links to DISCONTINUED_FLAG
MANUFACTURER_ID links to MANUFACTURER_ID
DISTRIBUTOR_ID links to DISTRIBUTOR_ID
The Named Port rules for ITEM_DESCRIPTION and PRICE override the All Ports rule. However, the Datatype rule overrides the Named Port rule for PRICE.
Named:ITEM_DESC (TO) DESCRIPTION
Named:PRICE (TO) ITEM_PRICE
Pattern:[A-Za-z_][A-Za-z_0-9]*_ID$ (TO) NEW_$0
All Ports
ITEM_ID links to ITEM_ID
ITEM_NAME links to ITEM_NAME
ITEM_DESC links to ITEM_DESC
PRICE links to PRICE
DISCONTINUED_FLAG links to DISCONTINUED_FLAG
MANUFACTURER_ID links to MANUFACTURER_ID
DISTRIBUTOR_ID links to DISTRIBUTOR_ID
The All Ports rule overrides all previous rules.
Pattern:^ITEM.*_.*$ (TO) $0_IN
Primary Key
Foreign Key
ITEM_ID links to ITEM_ID
ITEM_NAME links to ITEM_NAME_IN
ITEM_DESC links to ITEM_DESC_IN
MANUFACTURER_ID links to MANUFACTURER_ID
DISTRIBUTOR_ID links to DISTRIBUTOR_ID
The Primary Key rule overrides the Pattern rule for ITEM_ID.

0 COMMENTS

We’d like to hear from you!