Real Time Information Director User Documentation
    RTID Metadata Language 
Hewlett-Packard Company  71  529618-002   
}) 
In this example, the Alias enrichment redefines the name of PLOOKUP table as PL, to be 
used in later statements. The LeftJoin enrichment defines how to select records from 
other tables by matching the UNIQUEIDENTIFIER column in the lookup table. Finally, 
the output is restricted to the columns defined in the ColumnList metadata, plus the key 
columns of the lookup table. 
Mapping External to Internal IDs 
The Mapping enrichment defines a reversible table lookup process. It maps one or more 
external identifying values to a single internal column on an inbound (update) document. 
Conversely, it maps the internal column to one or more external identifying values on an 
outbound (query) document. The same Mapping enrichment works in both directions 
within a single document definition. For example, the mapping enrichment could map a 
driver’s license to the internal ID of a customer. In this case there would be two external 
identifying values: the driver’s license number itself and a value like "CA Drivers 
License". The same Mapping enrichment would convert the driver’s license to the 
internal ID on the inbound document, and the internal ID to the driver’s license on the 
outbound document. 
Procedure to Create a simple Mapping Enrichment 
The first step in defining a Mapping is to construct a Mapper object, statically, to 
describe the mapping table. The Mapper constructor takes three string parameters: 
•  The name of the mapping table or an EnrichedRecord. 
•  The name of column, within the mapping table, that contains the internal ID. 
•  The name or names of the column or columns, within the mapping table, that 
contain external identifying values. If there are multiple external identifying 
values, and hence multiple columns, use spaces to separate the column names. 
If you omit the parameter that specifies the external identifying values, the columns are 
assumed to be the key columns of the table. 
You could construct the Mapper object in the document definition that will refer to it, but 
because the same Mapper is likely to be useful for multiple document types, it is more 
common to define Mappers in a separate file. For example, the EHR example includes a 
class called EHR.java, which contains various reusable metadata objects for the EHR 
demo. 
Here are two Mappers constructed for the EHR example: 
public static final Mapper personMapper = new Mapper(personRecord,  
  "UNIQUEIDENTIFIER", "EXTERNALIDENTIFIER IDENTIFIERTYPECODE"); 
public static final Mapper nameMapper = new Mapper(nameRecord,  
  "UNIQUEIDENTIFIER", "LEGALNAME"); 










