This chapter provides an overview of the mapping process and discusses how to:
Set up target field default values.
Set up translation sets.
Create transformations by using the Transformation Wizard.
Use transformation PeopleCode.
Create map rules.
Mapping translates values from the source data to the format of the target source by using default target values, transformations, translation sets, and map rules to facilitate the process.
This section discusses:
Target field default value setup.
Translation set setup.
Transformation creation.
Map rule setup.
Target field default values allow you to set up values, which can be reused across multiple maps, to map to the target field. This allows having a central location for updating a target field value. For example, the target field default value for EFF_STATUS is set to A, and is used in 100 maps. At runtime, A is inserted into the target field for all those maps. If the value for EFF_STATUS is changed to Active, the value is updated once and when the 100 maps are run again, the new value will be inserted into the target field. No changes are necessary at the map level.
A default with no value is initialized to a blank, a zero, or the appropriate PeopleSoft null value.
When setting default values, consider the target field data type format:
Character fields are used for names, codes, and letter values.
Uppercase converts the field value to uppercase and signifies that no other formatting options apply to the field. Mixed case stores uppercase and lowercase characters as entered.
Number fields and signed number fields are fixed in field length and allow the entry of positive numbers.
Only signed numbers allow the entry of negative numbers.
Date fields contain calendar dates.
A date field has a field length of 10 characters and is maintained by the system.
The default format of a date field is defined by the database and can be overridden by your browser settings.
The following table discusses data type format considerations:
Source Field |
Target Field |
Required Considerations |
User Warning |
Date |
Date |
||
Date |
DateTime |
||
Char |
Char |
Truncation occurs as needed. |
|
Char |
Number |
Data must be numeric in the character source field. |
Appears when the character field is greater than the number in bytes. |
Number |
Number |
Appears when the numeric field is smaller in integer positions, decimals, or if the source is signed and the target is not. |
|
Number |
Char |
Character must be big enough. |
|
DateTime |
Date |
||
DateTime |
DateTime |
||
Time |
Time |
||
Long |
Long |
Note. The default value assigned must match the target field format or an error occurs at runtime. For example, you cannot assign a value of 7A to a numeric field. Specific error messages display during the save if a datatype conversion error occurs.
Use translation sets to define equivalent values or a code set for data conversion. For example: EA equals Each, GAL equals Gallon, and IN equals Inch. Translation sets make the data values consistent.
When data is copied from the source to the target, the data can be transformed by using edits, look ups, or PeopleCode. Transformations enable you to change a column's value. The Transformation Wizard guides you through the process of creating transformations.
You can create rules to be used by the AutoMapper feature in the map field detail definition where it attempts to match source fields with target fields. Use rules to assign correct default values to target fields when creating maps. By using map rules, you can assign a literal default, transformation, source field, or a translation set to a target field. If the map rule is required, you cannot override the rule when you define map field details.
See Also
This section discusses how to set up target field default values.
Page Name |
Object Name |
Navigation |
Usage |
Set Target Field Defaults |
EOEW_SET_DFLT_RUL |
|
Set target field default values that are used in the map field detail definition. |
Access the Set Target Field Defaults page.
Target Field |
Select the target field for which you want to define defaults. |
Source Input Value |
Enter the default value for the associated target field. Note. This field is free text, so you must consider the target field data type format. |
Allow Map Override |
Select to allow the field value to be overridden at the map level, otherwise the row will be protected. |
This section discusses how to set up translation sets.
Page Name |
Object Name |
Navigation |
Usage |
Translation Sets |
EOEW_CODE_TBL |
|
Enter translation set values for map definition details. |
Access the Translation Sets page.
Subject Area |
Select a subject area. For new translation sets, the subject area will be set to the default as defined on the Subject Area page. |
Undefined Value Options |
Select how to handle undefined values:
|
Enter the from and to values for each value that you want translated. If needed, enter the rationale for your selections in the More Information field.
See Also
This section provides an overview of the Transformation Wizard, lists common elements, and discuss how to:
Create transformation definitions.
Define edit, look ups or PeopleCode transformations.
Create message definitions.
(Optional) Set up source conditions.
(Optional) Define look up conditions.
Transformations are created differently based on the transformation type that you select on the definition page. The Transformation Wizard is a tool that guides you step-by-step through the process of creating transformations based on transformation type. The wizard enables you to navigate back and forth through only those pages that are necessary to create the transformation type that you select.
Note. Transformations occur after data has been extracted from your source.
The Transformation Wizard is comprised of up to six steps. The following table lists the steps that are necessary to complete look up, edit, and PeopleCode transformations:
Look Up |
Edit |
PeopleCode |
|
Create a transformation definition. |
Yes |
Yes |
Yes |
Define look ups. |
Yes |
No |
No |
Create a message definition. |
Yes |
Yes |
No |
Enter comments. |
Yes |
Yes |
Yes |
(Optional) Set up source conditions. |
Yes |
Yes |
No |
(Optional) Define look up conditions. |
Yes |
No |
No |
The Transformation Wizard navigation tool displays the number of pages that are necessary to create the transformation, and it highlights the current page. Click a page number to navigate to that page or click the Next and Previous buttons to navigate between pages. |
Page Name |
Object Name |
Navigation |
Usage |
Transformation Wizard - Transformation Definition |
EOEW_TRN_DFN_INFO |
Enterprise Components, Data Transformation, Data Transformation Home, Define Transformation Definition |
Enter transformation definition information |
Transformation Wizard - Look Up |
EOEW_TRN_DFN_LU |
|
Enter a join condition to establish a relationship between this transformation and the look up definition. |
Transformation Wizard - Edit |
EOEW_TRN_DFN_EDIT |
|
Select the message definition to use for edit processing. |
Transformation Wizard - Comments |
EOEW_TRN_DFN_COM |
|
Enter addition information about this transformation. |
Transformation Wizard - Source Condition |
EOEW_TRN_DFN_SRC |
|
Define the source input values for this transformation condition. |
Transformation Wizard - Lookup Condition |
EOEW_TRN_DFN_LUC |
|
Enter look up transformation definition properties. |
Access the Transformation Wizard - Transformation Definition page.
Enter a unique object name for the transformation. The system automatically converts the input to uppercase. For transformation type of PeopleCode, the name of the transformation object is used to reference the proper method in the PeopleCode transformation class. If the transformation object name does not contain a period (.) in its name, the corresponding method must be in the default class called EOEW_ETL_PUB:PeopleCodeTransformation. To call a class in a proprietary package, use the name of the method in addition to the name of the package and class. For example, if you have created a package called MY_APP_PKG, with a class called MYPC and a method called SET_UNIT_PRICE, the transformation object name is specified as MY_APP_PKG:MYPC.SET_UNIT_PRICE. Note. For PeopleCode transformations, the transformation object name must match the name of the Application Class method. |
|
Subject Area |
Select a subject area. For new transformations, the default subject is defined on the Subject Area page. |
Transformation Type |
Look up. Performs a look up against an intermediate table and returns a value. If the value does not exist, an error can be logged. An option is also available to default a value into the target field on error conditions. Edit. Performs edits against the entire source dataset. An edit is applied at a map level, not at a target field level. PeopleCode. Allows for a PeopleCode object reference. A PeopleCode Application Class method can be created to execute code for transformations that cannot be built with the available interfaces. |
See Also
Access the Transformation Wizard - Look Up page.
Record (Table) Name |
Select a record for the intermediary look up table. Note. This table must exist in the local PeopleSoft database. |
Field Name |
Select the value to be returned from the transformation and inserted into the target field. The available values are based on the record name that you selected. |
Join Transformation to Look Up
Source Input Value |
Select the source fields that are required for the join. |
Look Up Field Name |
Associate a look up field name value with a source input value to complete the join condition. |
Access the Transformation Wizard - Edit page.
Check If Edit Required |
Select if you require an edit to be performed with transformation errors. If this checkbox is cleared, the edit will still execute at run-time but the results will not be available. |
Message Set Number and Message Number |
Select a message set number and a message number to be logged with any transformation errors. |
Access the Transformation Wizard - Comments page.
Use the Comments field to enter commentary specific to this transformation. Try to thoroughly describe this edit to help others reuse it.
Access the Transformation Wizard - Source Condition page.
Use source conditions to further qualify the source data that is used for this transformation. You can enter additional criteria to restrict the rows of the source data that are used in the join to the look up table.
Access the Transformation Wizard - Look Up Condition page.
Record and Field |
Displays the record and field to be used to return a value. |
Default |
Enter the value for the target field if the look up fails or returns a null value. |
Return Look Up Record Field Conditions Grid
The look up condition further qualifies the look up table data that is used for this transformation. You can enter additional criteria to restrict the rows of the look up table that are used in the join to the look up table. The target field is populated based on the look up values that are provided.
This section provides sample code delivered with your PeopleSoft product and discusses how to use transformation PeopleCode.
Note. If you need to create your own package and class, ensure that they adhere to the same format as shown here.
The FUNCLIB object must be imported and your methods must take this object as its only parameter. The HashTable class is a utility providing some of the internal information that you need to code your PeopleCode transformation. PeopleSoft Data Transformer creates a temporary table at runtime to store the fields from your source data object and from which you can access your PeopleCode transformation. In addition, the name of this temporary table is dynamically assigned and cannot be hard-coded into your program. For these reasons, PeopleSoft delivers helper methods for you to access and modify the content of your data:
GetSourceFieldList() method returns a HashTable object containing a name-value pair for accessing your Source Data Object fields.
GetTransformFieldList() method returns a HashTable object containing a name-value pair for accessing target fields that have transformations associated with them.
GetTempTableName() returns the name of the temporary table that is used by PeopleSoft Data Transformer.
Sample PeopleCode Transformation
The following example updates the EOEC_CCI_UNITPRICE field on the target with a value of the source data object PROD_PRICE field plus a constant of 100, by issuing an UPDATE statement on the PeopleSoft Data Transformer temporary table.
Because the target field, EOEC_CCI_UNITPRICE, has an associated transformation, the actual name on the temporary table is resolved with a GetValue(EOEC_CCI_UNIT_PRICE) call on the transformation field's hash table. Similarly, the PROD_PRICE source data object field is resolved by making a GetValue(PROD_PRICE) call on the source field's hash table.
import EOEW_ETLAPI:COMMON:FUNCLIB; import EOEW_ETLAPI:COMMON:HashTable; class PeopleCodeTransformation method SET_UNIT_PRICE(&COMM As FUNCLIB); method MY_OTHER_PCODE_TRANS(&COMM As FUNCLIB); end-class; method SET_UNIT_PRICE /+ &COMM as EOEW_ETLAPI:COMMON:FUNCLIB +/ Local HashTable &SDOFields, &TranFields; Local string &SQLStatement; /* Retrieve the hashtable containing ALIASNAME->TEMPFIELDNAME value pair */ &SDOFields = &COMM.GetSourceFieldList(); &TranFields = &COMM.GetTransformFieldList(); /* Update the EOEW_CCI_UNITPRICE to: SDO.PROD_PRICE + SomeNumber This would resolve into something like: UPDATE ETL_TEMP_TBL SET ETL_TEMP_1 = EOEW_FP_N3_0 + 100 */ &SQLStatement = "UPDATE " | &COMM.GetTempTableName() | " SET " | &TranFields.GetValue("EOEC_CCI_UNITPRICE") | " = " | &SDOFields.GetValue("PROD_PRICE") | " + 100"; SQLExec(&SQLStatement); end-method; method MY_OTHER_PCODE_TRANS . . . end-method;
This section provides an overview of map rules and discusses how to define map rules.
AutoMapper uses the rules that you create in the map field detail definition. Rules may be based on the subject area, the source, the target, or any combination, depending on the business rule being applied. AutoMapper considers only map rules that are defined with a subject area matching the map's subject area or those that are assigned the default enterprise subject area. The rules are made up of transformations, constant default values, translation sets, and field map hints. If the map rule is required, you will not have access to override the rule on the Map Field Detail page.
This order of precedence and conditions applies when you assign different rules to a single target field:
Source
The source field must exist on the source data object that is associated with the map. The source field type must be compatible with the target field type.
Transformation
The fields that are defined as joins or constraints from the source data object must exist on the source data object that is associated with the map.
Translation Set
The fields that are defined as the join to the from value of the translation set must exist on the source data object that is associated with the map.
If no rules were found to match a given target field, processing occurs in this order:
Exact name match of target field.
Default value for the target field.
A zero or NULL is assigned to the field depending on its data type.
Page Name |
Object Name |
Navigation |
Usage |
Map Rule Definitions |
EOEW_RULE_DFN |
Enterprise Components, Data Transformation, Data Transformation Home, Define Map Rules, Map Rule Definitions |
Define map rules. |
Access the Map Rule Definitions page.
Active |
Select to make the rule active. Only active rules get used during an AutoMapper run. |
Allow Map Override |
Select to allow the rule to be overridden on the Map Field Detail page. |
Target Field |
Select the target field on which to base this rule. |
Subject Area |
Select a subject area. For new rules, the default subject area is defined on the Subject Area page. |
Source Input Type |
Source: Select to enable the Source Field Alias field, where you enter an alias for your source field if one is defined. If not, leave this field blank. AutoMapper always maps the alias into the selected target field. Transformation: Select to enable the Source field, where you enter a transformation object. AutoMapper always maps this transformation into the selected target field. Translation Set: Select to enable the Source Field Alias and Source fields, where you enter an alias and translation set. When AutoMapper sees the alias on the source, it always maps this translation set into the selected target field. |