Data Mapper is a visual data-mapping tool used for mapping elements in advanced data integration projects. This tool allows you to specify source and target schemas and to map data fields from source schema to target schema.
You can use the Data Mapper tool to map source schema elements to target schema elements. You can map one source schema element to a target schema element directly by drag and drop method. Additionally, this tool also offers certain mapping functions using which you can map source and target schema elements. Furthermore, the Data Mapper supports multiple source and target schemas. This implies that you can select more than one schema at a time, both at the source and the target end. This facilitates mapping of multiple source and target schema elements.
This feature is available in:
Enterprise | Premier | Professional | Express |
---|---|---|---|
√ | √ | √ | √ |
...
Pre- Requisites
- JRE 1.6 needs to be installed on your system to open the Data Mapper applet.
- Pop-up Blocker needs to be disabled in the web browser, to open the Data Mapper applet. By default, the Pop-up Blocker is enabled.
...
On the Adeptia Suite homepage, go to Configure > Services > Data Transform and then click Data Mapping.
This action will show you the Manage Data Mapping screen (see Figure 376).
Figure 376: Manage Data Mapping
...
Click the Create New link. The Create Data Mapping screen is displayed (see Figure 377).
Figure 377: Create Data Mapping
...
Click the Data Mapper button. This displays the Data Mapper screen (refer to Figure 378).
Info |
---|
If you are starting the Data Mapper on your system for the first time, then a warning message is displayed that prevents you from starting this application. Ignore this message and click Start to continue. |
Info |
---|
If you have read-only permissions, you can view a mapping activity in read-only mode. You can view the applied mapping, create new mapping rules, edit existing mapping rules and even run the simulation. For details, refer to the View Mapping in Read-Only Mode section. |
...
Click Advanced Properties if you want to set options for splitting data. You can split the source data into different chunks. You can specify the size of chunks in terms of the number of records. In the output however, only one file is generated at the location specified in the target activity. To know more about splitting data, refer to the Splitting Source Data section.
Info |
---|
You can set the Advanced Properties at any time of the mapping activity. |
...
The Data Mapper screen is divided into eight sections. These are outlined as:
- Menu Bar
- Tabs Panel
- Tool Bar
- Source Panel
- Target Panel
- Mapping Functions Panel
- Mapping Graph Area
- Parameters Panel
...
Menu Option | Sub-Option | Function |
---|---|---|
File
| Load Schema | Load a source and target schema activity into the Data Mapper |
Save | Save mapping activity | |
Exit | Exit Data Mapper | |
View
| Enable Tool Tips For Source/Target Tree | Activate or deactivate Tool Tips to be displayed at source or target leaf elements. Tool Tips are always displayed as active for root elements. |
Move Connection Ends | Set the width of connecting lines. By default, it is set to 50px. | |
View Mapping XML | Display generated XML file with line numbers. It is displayed in read-only mode. | |
Actions
| Validate XSL | Validate the generated XSL file. |
Global Custom XSL Before | Add custom XSL code at the top of the mapping XSL. | |
Global Custom XSL After | Add custom XSL code at the bottom of the mapping XSL. | |
On Demand (optimized) loading of XML Schema tree | If the XSD is complex, then this option allows you to process only the root level element and not the complete XSD. Only when you expand the hierarchy elements, it processes the child elements and loads them into the memory. The hierarchy elements expansion is now displayed in the applet. This option is applicable only on XML schemas. It optimizes the processing of XML schemas and loads the XSD elements only up to 2 levels in the source and target panels. You need to click a hierarchy element to load its further child elements. | |
Cache Included Schemas | This is applicable to all XML Schema which uses XMD. This option sets whether or not to cache the included xml schemas instead of inlining them as specified by the XML Specification. | |
Tree Expand Level for Optimized Loading | Defines the hierarchy level up to which the source and target files will be displayed for the schema loaded in Data Mapper. Hierarchy level is defined in the Tree Expand Level Dialog, which is opened when user clicks this menu option. | |
Tree Expand Level for Easy Schema Parser | Defines the hierarchy level up to which the source and target files will process the schema to load it into the Data Mapper. You can define the hierarchy level in the Tree Expand Level Dialog box, it appears when you click on this menu option. | |
Namespace | Manage Namespace | |
Exclude Result Prefixes | Exclude a namespace prefix from the target element | |
Enable DBQuery caching | Enable DBQuery cache. This implies that if the same DBquery is fired on another element, it will generate the result from the existing query, instead of creating a new connection. By default, the DBQuery cache is disabled. | |
Search Element | Search an element in the Source or Target schema hierarchy on the basis of Wild Card character(s) Comments, Data Type, Current Mapping Rules, Documentation, and Extension Node Element in the tree node of the Data Mapper. | |
Set Data Viewer Record Count | Set maximum number of records that can be shown in data viewer | |
Custom Auto Map Options | Add custom options for Auto Mapper | |
Value Map | Add options for value map | |
Enable Quick Splitting | Splits data at source end and merges at target end automatically | |
Import Mapping | Enables to map elements in a pattern that is similar to an existing mapping | |
Set Character Set Encoding for Data Parsing | Enables to set character set encoding for the target schema before mapping the data elements | |
Create Context Schema Definition | Context schema definition contains name of the context variable that you want to map to other element. | |
Filter Unmapped Elements | Filter elements or attributes from appearing in the target XML | |
C Data Section Elements | Enables to define C Data elements for the target schema which will be displayed on the Output section of the Debugger screen | |
XSL Transformer | This option gives you the choice to select the parser that you would want to use to parse your mapping activity in the Data Mapper. | |
Help
| Data Mapper Help | Display online help for the Data Mapper section. |
Mapping Functions Help | Display online help for mapping functions. | |
Tip of the Day | Displays the tips on start up. | |
About Data Mapper | Display the About box for the Data Mapper tool. |
...
Button | Name | Function |
---|---|---|
Data Mapper | Display the Data Mapper screen for mapping source and target elements. | |
XSL | Display the generated XSL code with line numbers for the mapping activity. | |
Debugger | Validate and view output of the mapping activity. |
...
Table 3: Options of Tool Bar
Button | Name | Function |
---|---|---|
Save Mapping | Save mapping activity | |
Remove All Mappings | Remove all the mapping between the source and the target elements | |
Validate XSL | Validate generated XSL | |
Auto Mapper | Map the source and the target elements if the structure of the source and the target schemas and the names of the source and the target elements are similar | |
One to One Mapping | Map all the source and the target elements under a parent element if the number of elements in the source and the target schemas are same | |
Toggle Element Properties | Displays the property of the source or target element, if it is defined in the schema. | |
Value Map | Opens the Value Map Options dialog box. | |
Custom Auto Map | To automatically map elements of source and target schemas where hierarchy and elements are different. | |
XSL Template(s) | To create XSL Template and further manage XSL templates from the Manage XSL Template screen | |
Load Schema | Open source and target schemas |
...
Target Panel
The Target Panel is used to display a target schema. All the elements of the target schema are listed in the Target Panel. When multiple target schemas are loaded, then all elements of each schema are listed under their respective target nodes.
...
Tab | Sub-Tabs | Function |
---|---|---|
Node
| Mapping Rules | Display graphical representation of the mapping of source and target elements. |
Textual Rule | Display the textual code representation of the mapping of source and target elements. | |
Local Variables | Create and define local variables for mapping source and target elements. | |
Properties | Display and set properties for source and target elements. Enables you to add comments for elements and applies sorting rules for target elements. It allows you to set the Disable-Output-Escaping property. | |
Global
| Global Variables | Create and define global variables for mapping source and target elements. |
Custom Methods | Create global methods for mapping source and target elements. | |
Key Functions | Create and define keys for mapping source and target elements. | |
Context Variables | Create and define context variables for mapping source and target elements. | |
Connection Info | Create and define connection info variables for mapping source and target elements. | |
Data Viewer
| Source | Preview Data of the uploaded file at the source end. |
Target | Preview Data at the target end according the uploaded source file and mapping rule applied. |
...
Button | Name | Function |
---|---|---|
Apply Mapping | Map the selected source elements to the selected target elements. | |
Remove Mapping | Remove the mapping between the selected source and the target elements | |
Pop Out Parameters Panel | Pop out the Parameters Panel and display it as maximized. | |
Add Global/Local/Context Variable/Key | Add a new global, local, context variable or a key. | |
Save Global / Local /Context Variable/Key | Save a new local, global, context variable or a key. | |
Remove Selected Global/Local /Context Variable/Key | Remove the selected global variable, local variable, context variable or key. | |
Remove all Global/Local/Context Variables/Keys | Remove all existing global variables, local variables, context variables or keys. | |
Clears Global / Local variable name and value text fields | Clear all data entry fields while adding a local or global variable. | |
Add New Method | Add a new custom method. | |
Remove Selected Method | Remove the selected custom method. |
Info |
---|
You can expand the Mapping Graph Area by clicking Maximize ( ) button displayed on the Split Bar below the Source and Target Panels. Similarly, by clicking Minimize ( ) button, you can restore the Mapping Graph Area to its original size. Alternately, you can drag the Split Bar to resize the Mapping Graph Area and Source and Target Panels. |
...
Parameters Panel
The parameters listed in the Parameters Panel are explained in the table below.
...
Parameters | Description |
---|---|
Global Variables | Display a list of all the global variables defined for the mapping of source and target elements in the current mapping object. |
Local Variables | Display a list of all the local variables defined for the mapping of source and target elements in the current mapping object. |
Custom Methods | Display a list of all the methods defined for the mapping of source and target elements in the current mapping object. |
Keys | Display a list of all the keys defined for the mapping of source and target elements in the current mapping object. |
Context Variables | Display a list of all the context variables defined for the mapping of source and target elements in the current mapping object. All context variables created in the Data Mapper are transferred to the Process Flow Designer. |
Templates | Display a list of all the XSL templates created for the mapping of source and target elements in the current mapping object. |
Connection Info | Display a list of all connection info variables. |
Global Methods | Display a list of all class files present in the Custom Classes folder. |
Value Map | Display a list of value maps created for the elements |
Info |
---|
All parameters are displayed in this section as and when they are created in the mapping process. |
...
The process of mapping elements comprises of various steps. These are outlined as:
...
Steps to load Source and Target Schemas
...
Figure 379: Load Schema button
Or click the File menu and select the Load Schema option (see Figure 380).
Figure 380: File Menu in Data Mapper
...
Figure 381: Select Schema
Info |
---|
If you create a new schema, then it will not be displayed in this list. To refresh the list of schemas click the Synchronize button. |
...
- At times, the list of schemas is very long. In such a case, you can search for schemas to be loaded, based on the schema name or type. Enter the name of the schema to be searched in the Quick Search text box and as you type letters, the search field will dynamically search for the values defined in all the schema types and update the table accordingly.
- To refine the search, you can select the schema type from the Schema Type column. The table will display you only the schema types that you would select. For example, if you select the Excel schema type button then, you will only see the Excel Schemas and the table will be updated accordingly. By default, you will be able to see all the schema types in alphabetical order.
- To load a schema, search the schema type and select the checkbox(s) corresponding to the schema type. You can select both the source and target schemas for the schema type. In addition, you can select different source and target schema type. This way, you can load multiple schemas at the same time. You can also select all the checkboxes to load all the schemas. There is no limit to the number of schemas that you can load at the same time.
- You can simultaneously load multiple web service schemas along with other schemas.
- If you have not created any a particular schema type the no schema will be displayed on clicking the respective schema type button.
...
Click the Load button after you have selected the schema(s) to open. The schema(s) that you will select, will be loaded into the Data Mapper window.
Info |
---|
Click the Close button to close the Select Schema window. |
...
Figure 382: Source and Target Schema Elements
Info |
---|
The Data Mapper now gives you the choice to select an XSLT transformer for your data |
...
Legend | Description |
---|---|
Leaf Element | |
Attribute Element |
Info |
---|
If you do not load any schema, then all the tabs of the Data Mapper appear as disabled. |
...
The Adeptia Suite provides two XSLT processors for transforming data mapping activity.
- Saxon (New Transformer)
- Xalan (Old Transformer)
Saxon transformer is much faster than Xalan. By default, the Data Mapper selects the Saxon transformer to transform all of your new mapping activity.
You can change the parser of any existing Data Mapping activity by following the steps below:
Click on the Action menu of the Data Mapping activity of your choice and then select the Edit menu option (see Figure 383).
Figure 383: Editing A Data Mapping ActivityOn the Edit Data Mapping screen, click on the Data Mapper button to edit the mapping activity (see Figure 384).
Figure 384: Edit Data Mapping Activity Screen- In the Data Mapper, click on the Actions menu and then select the XSL Transformer menu option.
- In the XSL Transformer dialog box, select the Saxon radio button and click Ok.
- Click on Save button to save the mapping of the Data Mapper.
- On the Edit Data Mapping screen, click on the Save button to edit the mapping activity. This action will display you a confirmation message (see Figure 385).
Figure 385: Confirmation Message
If you wish to revert to the old transformer (Xalan Transformer) then, you can achieve
that by the following steps:
- In the Data Mapper, click on the Actions menu and then select the XSL Transformer menu option.
- In the XSL Transformer dialog box, select the Xalan radio button and click the OK button.
- Click on the Save button to save the mapping activity.
Info |
---|
If you want to use the Saxon Transformer then follow these steps:
|
...
At times, when the source or target schemas are quite large, then searching an element can be very cumbersome. The Data Mapper applet eases this task by allowing you to search for an element in a source or target schema.
Steps to search an element in a source or target schema hierarchy
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
Click the Actions menu and select Search Element option (see Figure 386).
Alternately you can press <Ctrl> + <F> on the keyboard.
Figure 386: Select Search Element from Actions menu
The Element Search Dialog window is displayed (see Figure 387).
Figure 387: Element Search Dialog Box
- Enter the name of the element that you want to search for, in the Search Value field. You can also use Wild Card character(s) to search for an element. The Xpath of the element is automatically displayed in the Element Path field.
Select the appropriate option in the Scope Panel, to search the element in the Source or Target schema hierarchy. For example, if you want to search in the Source schema hierarchy, then select Source Tree option. Only one option can be selected at a time. By default, Target Tree is selected (see Figure 388).
Figure 388: Enter Parameters in Element Search Dialog Box
Info As per the enhanced functionality of the search element, you can now also search the element on the basis of comments, Data Type, Current Mapping (Rules), Documentation and Extension Node Element in the tree node of the Data Mapper.
Click Find. This searches for the first occurrence of the element in the selected hierarchy. If the element match is found, then that element is selected and highlighted. The Xpath of that node is displayed in the Element Path field (see Figure 389).
Figure 389: Element Match Found
If multiple matches are found for the search criteria, then the Direction Panel and the Find Next button is activated (see Figure 390). You can select the direction in which you want to search in the selected hierarchy. For example, if you want to search upwards in the hierarchy, select Up option. Only one option can be selected at a time. By default, Down is selected.
Figure 390: Multiple Matches Found
Click Find Next to search for the next element in the hierarchy, based on the selected direction. Once the element match is found, click Close to close the Search Element dialog box.
In case no element match is found, then a warning message is displayed (see Figure 391).
Figure 391: Adeptia Mapper Warning
- Click Yes to search again, else click No to close this screen.
...
You can map source and target elements using any of the listed methods:
...
This is the default and most commonly used method for mapping source and target elements.
Steps to map elements using Drag and Drop approach
...
Figure 392: Map Source and Target Element using Drag and Drop Approach
Info |
---|
Once a source and target element is mapped, the letter (M) is displayed next to each mapped source and target element. This signifies that the target element has been mapped to a source element. Refer to Table of Suffixes for details on suffixes displayed next to an element. |
...
Similarly, drag and drop each source and target element that you want to map. The mapping between all source and target elements will be displayed (see Figure 393).
Figure 393: Map Source and Target Elements
...
If you have loaded multiple source and target schemas, then drag and drop the source and target elements you want to map. The mapping between these elements will be displayed (see Figure 394).
Figure 394: Map Multiple Source and Target Schema Elements
Save the mapping activity and exit the Data Mapper.
Info |
---|
If you are mapping multiple source and target schema elements, then you need to assign data streams, before saving the mapping activity. |
Info |
---|
Once you have mapped source and target elements, you can view and validate the generated mapping XSL, from the Data Mapper screen. You can also view the target XML and view and validate mapping output from this screen. |
...
- One To One Mapping ( )
- Auto Mapper ( )
- Remove All Mappings ( )
...
Steps to use One to One mapping
...
Click One to One Mapping ( ) button. All the leaf elements of the parent element in the source schema will be mapped to their respective leaf elements of the parent element in the target schema.
Info |
---|
Only leaf elements are mapped using this button. It does not map complex elements. To map complex elements, you need to use the drag and drop method. |
Info |
---|
If multiple schemas are loaded, then dragging a source parent element will map all leaf elements of schemas displayed previous to the current schema. |
...
Steps to use the Auto Mapper
Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes. Additionally, the hierarchy and name of the all elements is the same (see Figure 395).
Figure 395: Same Hierarchy and Element NamesClick Auto Mapper ( ) button. The Auto Mapper Options dialog box is displayed (see Figure 396).
Figure 396: Auto Mapper Options- Select the mapping criteria from the Choose the Criteria dropdown list. Its options are listed as:
- Ignore Case: The source and the target elements are mapped even if they are of different case. Their attributes are not mapped.
- Case Sensitive: The source and target elements are mapped only if they are of the same case. Their attributes are not mapped.
- Ignore Case and Include Attributes: The source and target elements and their attributes are mapped even if they are of different case.
- Case Sensitive and Include Attributes: The source and target elements and their attributes are mapped, only if they are of the same case.
- Consider Only Leaf Element Count: The source and target elements are mapped only if the number of leaf elements in the source schema and target schema are the same. It is not necessary that names of source and target elements are similar. Their attributes are not mapped.
- Consider Only Leaf Element Count and Include Attributes: The source and target elements and their attributes are mapped only if the number of leaf elements in the source schema and target schema are the same. It is not necessary that names of source and target elements are similar.
- Click OK button. All elements of the source and target schema will automatically be mapped based on the selected criteria (see Figure 397).
Figure 397: Mapped Elements using Auto Mapper
...
Steps to remove all mappings between source and target elements
Click Remove all Mapping ( ) button. The Remove Options screen is displayed (see Figure 398).This screen displays a list of the properties, variables, custom methods, keys and templates associated with a mapped element, which can be removed with the mapping.
Figure 398: Remove Options
Info |
---|
The Remove Mapping, Remove Comments, Remove For Each and Remove Local Variables options are always enabled. The other options are enabled only if they have been defined for the mapped element. |
Select the checkbox(s) of the options that you want to remove and click OK button. All the selected options and all mappings between source and target elements will be removed.
Info |
---|
You can remove mapping associated with each element individually. For details, refer to the section Remove Mapping of an Element. |
...
- Global: The Custom Auto Maps defined within Global scope are available within all the mapping activities. Once you create a global Custom Auto Map in a mapping activity, you can use it in all the mapping activities.
- Group: The Custom Auto Maps defined within Group scope are available only within the specific user group.
...
The high-level steps to use Custom Auto Maps are:
- Defining a Custom Auto Map
- Activating a Custom Auto Map
- Using a Custom Auto Map in Mapping
...
You can define a Custom Auto Map by both manually providing the names of the source and target elements to be mapped in the Custom Auto Map Dialog screen or by defining the names of source and target elements to be mapped in a CSV file and then loading the CSV file in the Custom Auto Map Dialog screen. Loading a CSV file is useful when you have a large set of source and target elements to be mapped.
Defining a Custom Auto Map Using a CSV File
Steps to Manually Define a Custom Auto Map
...
Ensure that the source and target schemas are loaded in the Data Mapper and all their elements are listed under their respective nodes (see Figure 399).
Figure 399: Source and Target Schemas with different Element Names
...
Click the Custom Auto Map button on the tool bar or select Custom Auto Map from the Actions menu. The Custom Auto Map Dialog screen is displayed (see Figure 400).
Figure 400: Custom Auto Map Dialog screen
...
Select the scope of the Custom Auto Map. By default, the radio button Global is selected and a Custom Auto Map is saved in the Global scope.
Info |
---|
If you want to save the Custom Auto Map within the current user group, select the Group radio button. This will save the Custom Auto Map as the group Custom Auto Map and can be used in any mapping activity within the current user group. In the Parameters panel, the Custom Auto Map will be displayed under the folder hierarchy Custom Auto Map/Group. |
...
Enter the name of the target element to which you want to map the source element specified in previous step, in the Target Element column (see Figure 401).
Info |
---|
If you need to delete any row, select the respective row and click the Delete button. |
...
Figure 402: Parameters Panel
Info |
---|
If you need to close the Custom Auto Map without saving it, click the Close button. |
Defining a Custom Auto Map Using a CSV File
The Custom Auto Map feature also enables you to load a Comma Separated Values (CSV) file. You can use the set of values from the csv file which are separated by comma as a Map set for your process flow. For example, if you want to map the following source and target elements:
Source Element | Target Element |
EmpFirstName | firstName |
EmpLastName | lastName |
EmpMiddleInitial | middleNames |
...
- EmpFirstName,firstName
- EmpLastName, lastName
- EmpMiddleInitial, middleNames
Steps to Define a Custom Auto Map Using a CSV File
- In the Custom Auto Map Dialog screen, enter the name of Custom Auto Map in the Name textbox.
Click the CSV button to load a csv file if you want to map the values using the values defined in the csv file. The server will consider the comma separated pair of values as the source and target elements to be mapped (see Figure 403).
Figure 403: Custom Auto Map Dialog: Load CSV
An Open window is displayed.
- Browse and select the respective csv file.
- Click Open to upload the csv file. This will populate the source and target elements columns with the values defined in the CSV file. .
Select the scope of the Custom Auto Map (see Figure 404).
Figure 404: Custom Auto Map Dialog
- Click the Save & Close button to save the Custom Auto Map. This will add the Custom Auto Map value map in Custom Auto Map hierarchy in the Parameter Panel (see Figure 424).
Figure 405: Parameters Panel
...
When you define a Custom Auto Map, by default it is in deactivated state. To use a Custom Auto Map, you need to first activate it. Once you have activated the Custom Auto Map, you can use it in your mapping. Note that only activated Custom Auto Maps can be used in a mapping.
Steps to Activate a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map which you want to activate to use in a mapping.
Right-click the Custom Auto Map and select the option Activate (see Figure 406).
Figure 406: Parameters Panel: Custom Auto Map Activate option
- The status of the Custom Auto Map changes to Active (see Figure 407).
Figure 407: Parameters Panel: Custom Auto Map Status
...
After activating a Custom Auto Map, you can use it in your mapping. Note that only one Custom Auto Map can be activated in the current mapping.
Steps to Use the Custom Auto Map in a Mapping
- Load the respective source and target schema.
- Create and activate the Custom Auto Map.
- Map the parent record of the Source schema to the parent record of the Target schema.
Right-click the parent record of the target schema and select Connect Matching Record options (see Figure 408).
Figure 408: Select Connect Matching Children
The Connect Matching Children Dialog window is displayed (see Figure 409).
Figure 409: Connect Matching Children Options
- Select the mapping criteria from the Automap options list. Its options are listed as:
- Ignore Case: The source and the target elements are mapped even if they are of different case. Their attributes are not mapped.
- Ignore Namespace: The source and target elements are mapped, when their names are same but source schema has any namespace prefix.
- Recursive: Elements of parent level as well as all child level with the corresponding target elements.
- Mix Attributes: Attributes of source and target schemas are mapped.
- Select the mapping criteria from the Existing Options list. These options are :
- Retain: If any source and target elements are already mapped, those mapping will not be overwritten.
- Overwrite: Overwrites all the existing mappings.
- Click OK. This will map source and target schema as per the criteria selected (see Figure 410).
Figure 410: Source and Target elements are mapped
...
You can also manage the Custom Auto Map from the Parameters Panel. When you right-click the Custom Auto Map in the Parameters Panel, you can perform the following operations on a Custom Auto Map:
- Edit a Custom Auto Map
- Move a Custom Auto Map from Group to Global
- Delete a Custom Auto Map
...
Steps to Edit a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map to be edited.
Right-click the Custom Auto Map and select the option Edit (see Figure 406).
Figure 411: Parameters Panel: Custom Auto Map Edit option
The Custom Auto Map is open in Edit mode (see Figure 412).
Figure 412: Custom Auto Map Dialog screen in Edit mode
- Click the Save & Close button to save the Custom Auto Map.
...
Steps to Move a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map which you want to move from group to global.
Right-click the Custom Auto Map and select the option Move To Global (see Figure 429).
Figure 413: Parameters Panel: Move to Global option
A warning message is displayed (see Figure 430).
Figure 414: Warning Message- Click Yes to confirm moving the Custom Auto Map from Group to Global (see Figure 431).
Figure 415: Change Scope in Parameters Panel
...
Deleting a Custom Auto Map
Steps to Delete a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map which you want to delete.
Right-click the Custom Auto Map and select the option Remove (see Figure 406).
Figure 416: Parameters Panel: Custom Auto Map Remove option
A warning message is displayed (see Figure 417).
Figure 417: Parameters Panel: Custom Auto Map Status
- Click Yes to confirm the deletion of selected Custom Auto Map. The selected Custom Auto Map will be deleted.
...
- For the source element 'High' the Map value for the target element will be 'H'.
- For the source element 'Low' the Map value for the target element will be 'L'.
- For the source element 'Medium' the Map value for the target element will be 'M'.
...
You can also select the scope of a Value Map at the time of defining and saving it. Scope of Value Map is the context within which it is defined and can be accessible within or across the user groups. A Value Map can be defined in any of the following scope:
- Global: The Value Maps defined within Global scope are available within all the mapping activities. Once you create a global Value Map in a mapping activity, you can use it in all the mapping activities.
- Group: The Value Maps Templates defined within Group scope are available only within the specific user group.
...
- Defining a Value Map
- Using a Value Map in Mapping
- Managing a Value Map from the Parameters Panel
...
You can define a Value Map by either manually providing the mapping values that will be used in the target schema against the values of the elements present in the source schema in the Value Map Dialog screen or by defining the mapping values that will be used in the target schema against the values of the elements present in the source schema in a CSV file and then loading the CSV file. Loading a CSV file is useful when you have a large set of values to be mapped.
Defining a Value Map Manually
Steps to Manually Define a Value Map
...
Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes (see Figure 418).
Figure 418: Elements of Source and Target Schema
...
Click the Value Map button on the toolbar or select the option Value Map from the Actions menu. The Value Map Dialog screen is displayed (see Figure 419).
Figure 419: Value Map Options Dialog screen
...
Select the scope of the Value Map. By default, the radio button Global is selected and a Value Map is saved in the Global scope.
Info |
---|
If you want to save the Value Map within the current user group, select the Group radio button. This will save the Value Map as the group Value Map and can be used in any mapping activity within the current user group. In the Parameters panel, the Value Map will be displayed under the folder hierarchy Value Map/Group. |
...
- For the source element 'High' the Map value for the target element will be 'H'.
- For the source element 'Low' the Map value for the target element will be 'L'.
- For the source element 'Medium' the Map value for the target element will be 'M'.
For the source element which is not provided the target element will be mapped to 'Normal' as defined in the Default Value field.
...
Info |
---|
If you need to delete any row, select the respective row and click the Delete button. |
...
Click the Save & Close button to save the Value Map. This will add the Value Map in Value Map hierarchy in the Parameter Panel. Similarly you can add more Value Map.
Figure 421: Parameters Panel
Info |
---|
If you need to close the Value Map without saving it, click the Close button. |
Defining a Value Map Using a CSV File
The Value Map feature also enables you to load a Comma Separated Values (CSV) file. You can use the set of values from the csv file which are separated by comma as a Map set for your process flow. For example, if you want to change the values defined for the priority of mail as:
- For the source element 'High' the Map value for the target element is 'H'.
- For the source element 'Low' the Map value for the target element is 'L'.
- For the source element 'Medium' the Map value for the target element is 'M'.
...
Steps to Define a Value Map Using a CSV File
- In the Value Map Dialog screen, enter the name of Value Map (for example, PriorityMap_forcsvfile in the Name textbox.
Click the CSV button to load a csv file if you want to map the values using the values defined in the csv file. The server will consider the comma separated pair of values as the target element and its mapped value (see Figure 422).
Figure 422: Value Map Dialog: Load CSV
An Open window is displayed
- Browse and select the respective csv file.
- Click Open to upload the csv file. This will populate the Value and Map columns.
- Select the scope of the Value Map.
Enter the default value in the Default Value field (see Figure 423).
Figure 423: Value Map Dialog screen
- Select the Pick from Source checkbox, if required.
- Click the Save & Close button to save the Value Map. This will add the Value Map value map in Value Map hierarchy in the Parameter Panel. Similarly you can add more Value Maps (see Figure 424).
Figure 424: Parameters Panel
...
Steps to Use the Value Map in a Mapping
- Now to map it, select a target element, for example Priority. The selected target element is shown in Mapping Graph Area.
- Double click on a value map you want to use, from the Value Map hierarchy of Parameter Panel. For example, PriorityMap.
- Now double-click the source element. For example, Priority.
Connect the output of the source element to input of value map and then connect the output of value map to the input of the target element (see Figure 425).
Figure 425: Use Auto Map in a Mapping
- Once you have performed the mapping activity, click Apply Mapping ( ) button to save the mapping. The mapping will be applied (see Figure 426).
Figure 426: Mapping between the Source and Target Schema
...
You can also manage the Value Map from the Parameters Panel. When you right-click the Value Map in the Parameters Panel, you can perform the following operations on a Value Map:
- Edit the Value Map
- Move a Value Map from Group to Global
- Delete a Value Auto Map
...
Steps to Edit a Value Map
- In the Properties Panel, select the Value Map to be edited.
Right-click the Value Map and select the option Edit (see Figure 406).
Figure 427: Parameters Panel: Value Map Edit option
The Value Map is open in Edit mode (see Figure 412).
Figure 428: Value Map Dialog screen in Edit mode
- Click the Save & Close button to save the Value Map.
...
Steps to Move a Value Map
- In the Properties Panel, select the Value Map which you want to move from group to global.
Right-click the Value Map and select the option Move To Global (see Figure 429)
Figure 429: Change Scope in Parameters Panel
A warning message is displayed (see Figure 430).
Figure 430: Warning Message
- Click Yes to confirm the change of scope from Group to Global (see Figure 431).
Figure 431: Change Scope in Parameters Panel
...
Steps to Delete a Value Map
- In the Properties Panel, select the Value Map which you want to delete.
Right-click the Value Map and select the option Remove (see Figure 406).
Figure 432: Parameters Panel: Value Map Remove option
A warning message is displayed (see Figure 417).
Figure 433: Application MessageClick Yes to confirm the deletion of selected Value Map. The selected Value Map will be deleted.
...
This is an additional feature of mapping elements. You can copy the mapping associated with a target element and paste it on other target elements.
Steps to copy the mapping of a target element
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes. Additionally, a source and target element should be mapped.
- Right-click the target element whose mapping you want to copy and select the Copy Mapping option. This copies the mapping of the selected target element.
...
Right-click the target element on which you want to paste the mapping and select the Paste Mapping option.
The Paste Mapping Options screen is displayed with a list of Paste options (see Figure 434).
Figure 434: Paste Mapping Options
...
This screen displays a list of options that can be pasted with the mapping. It includes the For Each and Comments properties and local variables.
Info |
---|
The Paste Mapping option is always enabled. The other options are enabled only if they have been defined for the copied element. |
Select the checkbox(s) of options you want to paste with the mapping, and click OK. The mapping with the selected options is pasted on the target element.
Info |
---|
If local variables are pasted for a target element, they are not overwritten, but are added to the existing local variables of that target element. |
Info |
---|
You can also copy a mapping instance and paste it onto another instance. This is possible only if the schemas are same in both the mapping instances. |
...
Ensure that the [source and target schemas are loaded and all their elements are listed under their respective nodes. (see Figure 435).
...
Click Actions menu and select Import Mapping (see Figure 436).
Figure 436: Select Import Mapping Option
The Import Mapping Dialog screen is displayed (see Figure 437).
...
Figure 438: Mapping Imported
...
You can use the mapping functions built-in the Data Mapper to map source schema elements to the target schema elements. These mapping functions are listed as:
...
Click a target element. The target element node is displayed in the Mapping Graph Area (see Figure 439).
Figure 439: Select Target Element
Double-click a source element. The source element is displayed in the Mapping Graph Area (see Figure 440).
Figure 440: Select Source Element
Info |
---|
You can double-click more source elements if required. This will display the selected source elements in the Mapping Graph Area (see Figure 441). |
...
Info |
---|
Once you have mapped source and target elements, you can view and validate the generated mapping XSL, from the Data Mapper screen. You can also view the target XML and view and validate mapping output from this screen. |
...
Suffix | Description |
---|---|
(C) | Target element can be cloned to create another target element. |
(CM) | Comments have been added for the target element. |
(F) | For Each property has been applied for the target element. |
(LV) | A local variable has been declared to the target element. |
Info |
---|
More than one suffix can be displayed next to a source and target element. |
...
Click the File menu and select Save to save the mapping. Alternately, you can click the Save ( ) button on the toolbar. The server first validates the mapping activity. If successful, it displays a dialog box confirming that the mapping has been saved successfully. If the Comments property is enabled, then clicking Save will display a screen where you need to enter comments related to the mapping. (see Figure 442).
Figure 442: Add Comments (Mapping)Enter comments in the textbox Specify comments for mapping object<object name>.
Info The comment should be at least 1 character in length.
If you enable/disable the Comments property in the middle of a mapping activity, you need to restart the mapping applet.- Click OK to save the comments. This displays a dialog box confirming that the mapping has been saved successfully.
Click File menu and select Exit to close the Data Mapper applet. A confirmation dialog box is displayed (see Figure 443).
Figure 443: Exit from Data Mapper
Click the Yes button to exit the Data Mapper screen and return to the Manage Data Mapping screen. If the mapping object has not been saved, then the Save Mapping Object dialog box is displayed (see Figure 444).
Figure 444: Save Mapping Object
- Click the Save To Server button to save the mapping object to the Adeptia Suite. A screen is displayed where you need to enter comments related to the mapping. (refer to Figure 442).
- Enter comments in the Specify comments for mapping object <object name> field.
- Click OK to save the comments. This displays a confirmation dialog box stating that the mapping has been saved successfully. The control returns to the Manage Data Mapping screen, where a list of mapping activities is displayed.
- Refresh the Internet browser to view the saved mapping activity.
Info |
---|
You can view and validate the generated mapping XSL, view the mapping XML and view and validate mapping output, before saving the mapping activity. |
Info |
---|
At times, on saving a mapping activity, the memory usage may exceed its actual capacity depending on the JVM and the operating system. |
...
Click the XSL tab on the Tabs Panel to view the generated mapping XSL. The generated XSL code with line numbers is displayed (see Figure 445).
Figure 445: Mapping XSL
...
Click the Action menu and select Validate XSL option to validate the generated XSL. A dialog box is displayed confirming that the XSL is valid.
Info |
---|
If generated XSL is invalid, then an error is displayed as a selected line. Error details are displayed in the XSL Errors Pane. It displays one error at a time. |
Click OK to close the above dialog box.
Info |
---|
You can also validate the generated XSL from the Create Data Mapping screen. For more details, refer to the section Splitting Source Data. |
...
- Click the View menu and select View Mapping XML option. This displays the generated XML code with line numbers, in read-only mode (see Figure 446).
Figure 446: View Mapping XML
...
Once you have mapped source and target schema elements, you can view and validate the output of the mapping activity. This feature enables you to test the data and make modifications to the mapping activity, before saving it.
Steps to view and validate mapping output
Click the Debugger tab on the tabs panel to view and validate the output of the mapping activity. The Debugger is displayed on the Data Mapper screen (see Figure 447).
Figure 447: Debugger screen
...
Suffix | Description |
---|---|
Input | Displays data for all input schemas in XML format. This data can be mockup data or a selected XML file. |
XSL | Displays the generated XSL. You can generate sample output data based on the input data. |
Output | Displays the generated output data for all schemas. |
Variables/ Params | This section comprises of two tabs: |
Errors | Displays all errors encountered during debugging.
|
...
Figure 448: Generate Mockup Data
Info |
---|
Data will be generated for all input schemas. |
...
Alternately, you can display input data from an existing XML file. Click Load Input XML button ( ) displayed in the Input section to select and upload the existing XML file.
Info |
---|
Another way of uploading the XML file is right-clicking the Input section and clicking the Load option. |
...
Click the Save button ( ) displayed in the Input section to save the generated input data.
Info |
---|
You can simulate the mapping either on the desktop or on the server. By default, simulation is done on the desktop. Simulating on the server supports global functions, custom methods, Context Variable, Set Context, Get Context and the DBlookup () functions. However, it can be used only in case of mapping of single source and target elements. |
...
Figure 449: Output XSL
Info |
---|
You can stop the generation of output data at any time by clicking the Stop button displayed in the XSL section. |
...
Schema | Tree View | Grid View |
---|---|---|
Adv. Text Schema | ? | X |
Excel Schema | ? | ? |
Hierarchical Excel Schema | ? | X |
Text Schema | ? | ? |
XML Schema | ? | X |
Adv. Positional Schema | ? | X |
Positional Schema | ? | ? |
...
To use Data Viewer, click the Data Viewer tab. The Data Viewer panel is displayed (see Figure 450).
Figure 450: Data Viewer
...
To attach the source file, right click the Root element in the Source Panel and select Attach Source option and select the source file (see Figure 451).
Figure 451: Attach Source
...
After selecting the source file, again right click the Root element in source panel and select Preview. Source Data is displayed in the Grid View panel (see Figure 452).
Figure 452: Source records in Grid View
Info |
---|
By default maximum 50 records are displayed in the Data Viewer. To view more records, click Action menu and select Set Data Viewer Record Count and enter the desired value. When you change this value, you need re-attach the source. |
...
If there is any error record in the source file, a pop-up message is displayed that "Error Records found in the source data." (see Figure 453).
Figure 453: Pop-up message
...
To view the source data in Tree View, click the Tree View tab. The source data is selected in the hierarchy view (see Figure 454).
Figure 454: Tree View
...
To view the values of the record, click [+] to expand the Record. Values of the expanded record are shown (see Figure 455).
Figure 455: Records in Tree View
...
If there is any error encountered in the source data, those error records are shown in the Errors tab. To view the error records, click Errors tab (see Figure 456).
Figure 456: Error Record
...
Info |
---|
In case XML Schema is used at target end, then unmapped elements are filtered out automatically. |
...
- The number of errors occurred during transformation
- The list of errors occurred during transformation
- List of enumerated literals for the target element if invalid data is mapped to the target element which is restricted to the enumerated values
...
To expand the Source or Target panel, click . The Source or Target panel is shown in the expanded (see Figure 458).
Figure 458: Target Panel in expanded mode
...
...
Steps to view mapping activity in PDF format
- On the Adeptia Suite homepage, go to Configure > Services > Data Transform and then click Data Mapping. The Manage Data Mapping screen is displayed (refer to Figure 376).
- Click the radio button against the mapping activity whose PDF details you want to view. This selects the mapping activity and activates the PDF View link. Clicking this link displays a PDF file with all information associated with the mapping activity.
This file displays divides the mapping information into various pages. The first page contains mapping information such as mapping name, description; creation details and the group owner (see Figure 459).
Figure 459: Mapping Information Document
The next page displays all source and target schema information (see Figure 460).
Figure 460: Schema Information
- The next page displays all other mapping information such as XSL templates used, variables defined, properties, keys, and sorting rules (see Figure 461).
Figure 461: Detailed Mapping Information
...
If you have read-only rights, you can still view a mapping activity. You can view the applied mapping, create new mapping rules, edit existing mapping rules and run simulation. However, you cannot save the mapping activity.
Steps to view mapping in read-only mode
...
On the Adeptia Suite homepage, go to Develop > Services > Data Transform and then click Data Mapping. The Manage Data Mapping screen is displayed (refer to Figure 462).
Figure 462: Manage Data Mapping Screen
...
Click the mapping activity that you want to view in read-only mode. The View Data Mapping screen is displayed (see Figure 463).
Figure 463: View Data Mapping
Click the Data Mapper button. This displays the selected mapping activity in the Data Mapper applet in read-only mode (see Figure 464).
Info |
---|
In the read-only mode all save options in the Data Mapper are disabled. |
...
...
Splitting feature enables you to process large files. You must use splitting if your source file is huge. If you do not use splitting in this case, then Data Mapper may not be able to map it. If the data in the source file is huge, you can split the source data into different chunks. You can specify the size of the chunks in terms of the number of records or data streams. In the output, however, only one file is generated at the location specified in the target activity.
Steps to split the source data
...
Click Advanced Properties on the Create Data Mapping screen to expand the advanced properties of the new Mapping activity (see Figure 465).
Figure 465: Advanced Properties
...
Select the Splitting Data checkbox to enable the splitting of data.
Info |
---|
If you select this checkbox, then you have to split the data. You can do this by setting the Splitter XPath in the Data Mapper applet. Alternately, you can split the data by Enabling Quick Splitting feature. |
...
Enter the number of chunks you want to process concurrently, in the Maximum Concurrent Processes field. By default, value of 1 is entered.
Info |
---|
It is advised to change this value, if Parallel Processing is selected. Else, only one chunk is processed at a time and hence sequentially. |
...
If mapping has been saved in the Data Mapper applet, then the XSL code is displayed in Mapping XSL field. This is a very useful feature. You can enter new XSL code or edit existing code to test or debug the mapping. If you save these changes, then they are reflected in the applet. For example, if you need to change the value of a constant, you can change it from this screen itself, instead of the applet. Additionally, any modifications made in the Mapping XSL code in the Data Mapper applet, will overwrite the XSL code in this field.
Info |
---|
If the Advanced Properties and the Data Mapper screens are open simultaneously, then the changes made in the Mapping XSL field in the Advanced Properties screen will not be reflected in the Data Mapper screen. |
...
...
To split data you need to set the Splitter XPath on the source hierarchy. The data is split and sent to the transformer which executes the split data. You can set the Splitter XPath in case of a single source schema only. You can also set multiple Splitter XPaths in a source schema.
The following example explains the use of multiple Xpath splitting:
...
Once splitter XPath is defined, during execution, mapping will split the source hierarchy using each splitter Xpath and each chunk will have records specified by Split Number of Records.
In this scenario, when we set R1 and R2 as split XPath then Split Number of Records property is applied for both R1 and R2. For example if the value of Split Number of Records property is 500 then 500 records of R1 and 500 records of R2 are selected.
Splitting data and setting Splitter XPath is very effective when the source data is very large. You can set the Splitter XPath in case of a single source and target schema. You can also set multiple Splitter XPaths in a source and target schema.
Info |
---|
It is advised to always split the file and set the Splitter XPath if the file size is greater than 30 MB. This enhances the performance and increases data reliability, as in some cases such execution of large data can fail and generate errors. |
...
Right-click the source schema element that you want to split and select the Set as Splitter XPath option. A screen showing the Splitter XPath details is displayed (see Figure 466).
Figure 466: Splitter XPath Details
Info |
---|
Splitting can be set only on root or record levels. You cannot split on an element level. |
Click OK. This splits and sets the Splitter XPath on the selected source element.
Info |
---|
Once a Splitter XPath is set for a source element, the letter (S) is displayed next to that source element. This signifies that the source element has been split and the Splitter XPath has been set. Refer to Table of Suffixes for details on suffixes displayed next to an element. |
...
- Ensure that all the source and target schemas are loaded and all their elements are listed under their respective nodes.
Select Actions menu and select Enable Quick Splitting option. Alternately, you can press <Ctrl> + <Q>. This splits the data and displays the splitter Xpath details (see Figure 467).
Figure 467: Splitter Xpath Details(Enable Quick Splitting)- Click OK. This splits and sets the Splitter XPath on the selected source element.
However, quick splitting splits the records in default numbers. To split into a specific number, you need to set the Splitter Xpath explicitly.
Info |
---|
Once a Splitter XPath is set for a source element, the letter (S) is displayed next to that source element. This signifies that the source element has been split and the Splitter XPath has been set. Refer to Table of Suffixes for details on suffixes displayed next to an element. |
...
Click View menu and select View Mapping XML. The Mapping XML window is displayed. The Splitter XPath details are displayed with a $Input tag prefixed to Source XPath code (see Figure 468).
Figure 468: Splitter XPath in Mapping XML
You can remove a Splitter XPath that has been set for a source element.
Steps to remove Splitter XPath
Right-click the source schema element whose Splitter XPath you want to remove and select the Remove Splitter XPath option. A screen showing the Splitter XPath details is displayed (see Figure 469).
Figure 469: Remove Splitter XPath Details
- Click OK. This removes the Splitter XPath set on the selected source element.
...
Once you have split the source data by setting the Splitter XPath on a source element, you need to merge the split data at the target end. For this, you need to set the Merger XPath on a target element.
Setting the Merger XPath is largely dependent upon the Splitter XPath. You need to ensure that the number of Splitter XPaths and the Merger XPaths at the source and target schemas respectively are the same.
Steps to set Merger XPath
- Ensure that all the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Ensure that a Splitter XPath has been set for a source schema element.
Right-click the target schema element on which you want to merge the split data and select the Set as Merger XPath option. A screen showing the Merger XPath details is displayed (see Figure 470).
Figure 470: Merger XPath DetailsInfo Merging can be set only on root or record levels. You cannot merge on an element level.
Click OK. This merges the split data and sets the Merger XPath on the selected target element.
Info Once a Merger XPath is set for a target element, the letter (S) is displayed next to that target element. This signifies that the split data has been merged on the target element and the Merger XPath has been set. Refer to Table of Suffixes for details on suffixes displayed next to an element.
Info You can view Merger XPath details in the output XML. A $ input tag is prefixed to the line containing the Splitter XPath details.
Info When using Enable Quick Splitting feature, the Merger Xpath is also automatically set when this feature is selected.
- Once you have set a Merger XPath, you can view it in the Output XML.
...
Click View menu and select View Mapping XML. The Mapping XML window is displayed. The Merger XPath details are displayed with Target XPath code (refer to Figure 468).
You can remove a Merger XPath that has been set for a target element.
Steps to remove Merger XPath
Right-click the target schema element whose Merger XPath you want to remove and select the Remove Merger XPath option. A screen showing the Merger XPath details is displayed (see Figure 471).
Figure 471: Remove Merger XPath Details
- Click OK. This removes the Merger XPath set on the selected target element.
...
When mapping multiple source and target schema elements, you need to assign streams to the root element of the target schema structures.
Steps to assign data streams
...
Right-click the root element of a target schema structure and select the Assign Stream option. The Assign Streams dialog box is displayed (see Figure 472).
Figure 472: Assign Streams
...
Field | Description |
---|---|
Order | Represents the order of occurrence of target schema in the Data Mapper. This field is a read-only field and is automatically populated with value. |
Schema Name | Represents the name of the schema which includes the root to which the stream is to be assigned. This field is a read-only field and is automatically populated with value. |
Root Element | Represents the root element to which the stream is to be assigned. This field is a read-only field and is automatically populated with value. |
Stream Name | Represents the name of the stream to be assigned. This field is automatically populated with value, but is an editable field. |
Info |
---|
The root elements, occurrence order and default stream names of all the loaded target schemas are listed in the Assign Streams dialog box. You can edit the stream name. |
Info |
---|
It is important to note that the order of streams and the stream names, listed in the Assign Streams dialog box (Mapping) and the Multiple Streams defined in Process Designer should be the same. If you edit a stream name of a mapping activity or add or delete a stream or schema after the activity has already been used in the Process Designer, then you need to update it manually in the Process Designer (Create Multiple Streams section). To know how to use multiple stream in Process Designer, refer to the section Creating Multiple Stream |
...
Enter the name of the data stream(s) that you want to edit, for the target element(s), in the textbox Stream Name.
Info |
---|
The name of the data stream does not accept special characters and white spaces. |
...
...
You can remove mapping associated with a particular element.
Steps to remove mapping of a particular element
- Ensure that all the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Right-click the target element whose mapping you want to remove and select the Remove Mappings option.
The Remove Options window is displayed (see Figure 473).
Figure 473: Remove Options (Particular Element)This screen displays a list of properties and variables associated with the selected element that can be removed with the mapping.
Info Only the Remove Mapping is displayed as always enabled. The other options are enabled only if they have been defined for the particular element.
- Select the checkbox(s) of the options that you want to remove and click OK button. All the selected options and mapping associated with the particular element will be removed.
...
Context schema allows you to map Context Variable with any element of schema.
This section explains you how to use context schema to map context variable.
High level steps to use context schema are as follows:
- Create Context Schema Definition
- Load Context variables
- Map schema elements
- Modify streaming properties of Mapping Activity
...
First of all you need to create context schema definition. Context schema definition contains name of the context variable that you want to map to other element. While creating context schema definition, you can create context variables or you can import it from the process flow within which you want to use this mapping activity.
Steps to create Context Schema Definition
In Data Mapper applet, from the Action menu and select Create Context Schema Definition. The Create Context Schema Definition Dialog window is displayed ( see Figure 474 ).
Figure 474: Create Context Schema
Info Only the Remove Mapping is displayed as always enabled. The other options are enabled only if they have been defined for the particular element.
- To add a context variable click Add button and enter the name of the variable.
Repeat the same steps to create other variables (see Figure 475 ).
Figure 475: Add Variables
You can also import the context variables of the process flow in which you want to use this mapping activity. To import context variables from process flow, click Import From Process Flow button. Import Context Variable dialog box is displayed (see Figure 476 )
Figure 476: Import Context Variables
- Select the process flow, from which you want to import context variables and click Load.
- Click Save.
...
Once you have created the context schema, you need to load it at source or target end depending on your need.
Steps to Load Context Schema Definition
To load the Context Schema at source end, click the Open Source Schema button in the source panel. Select Schema dialog box is displayed ( see Figure 477).
Figure 477:Load Context Variable
- Select the Context Variable radio button and click the Load button. The variables on Context schema are loaded in source panel.
- Similarly you can load context schema in the target panel.
...
Map Schema Elements
Once you load the context schema, you can map its variables to elements of other schema (see Figure 478 ).
...
Once you created the mapping activity using context schema you need to changes its streaming properties while creating process flow using this mapping activity.
If Context Schema is loaded at source side then there is no need to provide the source (dummy source) stream to the Mapping activity. Similarly if Context schema is loaded at target side then Mapping activity will not generate any output stream, so there is no need to attach dummy target. To achieve this Generate Stream and Consume Stream property has been added to Data Mapper activity in the Process Designer. User can disable these properties based on whether Context schema is loaded at source or target side.
Steps to disable input and output stream of mapping activity
...
While designing the process flow, double click the mapping activity that you have created using context schema definition. Properties of the mapping activity are displayed (see Figure 479 )
Figure 479:Change streaming
Change the value of Consume Stream or Generate Stream property to false.
Info |
---|
If Context Schema is used at source side, then at run time the actual value of these context variables will be used in the Data mapping. Similarly if Context Schema is used at target side then the output of the data mapping will be parsed and corresponding new value of these context variables will be set. |
...
Right-click the blank space in the Mapping Graph Area and select the Constants option. A Constant node is displayed in the Mapping Graph Area (see Figure 480).
Figure 480: Add a Constant Node
...
Double-click the Constant node. The Input dialog box is displayed (see Figure 481).
Figure 481: Enter Constant Value
...
Mark the Add Quotes checkbox as checked, if you want to define the constant as a string. Else, the constant is defined as numeric data. By default, this checkbox is unchecked, implying that a constant is defined as a number. However, you can change the constant to string data type by checking this checkbox anytime.
Info |
---|
If the constant is defined as a string data type, then Appose trophy (') symbol is supported. Additionally, you can enter constants as an input for Select query too. |
...
...
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Math
| Add | Adds two numeric elements. | (10) + (5) returns 15 |
Ceiling | Rounds a passed number to the smallest integer that is greater than or equal to the passed number. | Ceiling (33.9) returns 34 | |
Division | Divides two numeric elements. | (100) div (5) returns 20 | |
Floor | Rounds a passed number to the largest integer that is not larger than the passed number. | floor (33.9) returns 33 | |
Mod | Returns the remainder of a division between two numeric values. | (50) mod (3) returns 2 | |
Multiply | Multiplies two numeric elements. | (10) * (5) returns 50 | |
Round | Rounds a passed number to the nearest integer. | round (4.6) returns 5 | |
Subtract | Subtracts one numeric value from other. | (10) – (5) returns 5 | |
Number | Converts parameter to a number. | number ("-17.3") returns -17.3 | |
Format number | Transforms input data into a specific format. By default it rounds off the value by considering only the digits before the decimal point. You may, however, specify the number of decimal places to be considered by increasing the count of hashes (#), see corresponding example. The specific formats allowed are decimals and %. This function can be used only if the target node is of string data type. | format-number (12.5, '#.##') returns $12.50 |
...
Steps to map elements using the 'Division' Math Mapping Function
...
Click Math function menu and select the Division sub-function. A div node is displayed in the Mapping Graph Area (see Figure 482).
Figure 482: Add Div Sub-Function Node
...
Create a link from the output of the div function node to the Target element (see Figure 483).
Figure 483: Create Links between Nodes for Mapping Elements using Div Function
...
Using String Function
...
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
String
| Concat | Concatenates the second string after the first string. | concat ('Jane', 'Brown') |
Substring | Returns the sub string from the string starting from the specified position and of the specified length. When using this function, you always start counting its position from 1. This implies that the second argument (position) is always greater than or equal to 1. | substring ('abcdef' ,3, 4) | |
String | Returns the string value of the argument. | string ('1000') returns the string 1000 | |
Translate | Translates each occurrence of the first argument in the specified string to the second argument. Both the arguments must consist of one or equal number of characters. | translate ('alphabet', 'a','t') | |
Substring-after | Returns the string after the specified argument from the string. | substring-after ('print=yes', '=') returns yes | |
Substring-before | Returns the string before the specified argument from the string. | substring-before ('print=yes', '=') returns print | |
Starts-with | Returns true if the string starts with the specified argument or false otherwise. | starts-with ('Sales', 'S') | |
String-length | Returns the length of the specified string. | string-length ('adeptia') | |
Contains | Returns true if the string contains the specified argument or false otherwise. | contains ('adeptia', 'tia') | |
Normalize-space | Removes leading and trailing white space (space, tab and new line) from a string, and replaces internal sequences of white space with a single space character. | normalize-space (' Adeptia Inc ' ) returns Adeptia Inc | |
Name | Returns the name of the source node and field name on which mapping is currently done. | If the context node is an element named <ms:schema>, then | |
Local-name | Returns name with the name prefix. If no prefix was specified, then name and local name are same. | If context node is an element named <ms:schema>, then |
...
Steps to map elements using the 'Concat' String Mapping Function
...
Ensure that the source and target elements to be mapped are selected and displayed in the Mapping Graph Area.
Info |
---|
You need to load two source elements for using this mapping function. |
...
Create a link from the output of the concat node to input of the target element node (see Figure 485).
Figure 485: Create Links between Nodes for Mapping Elements using Concat Function
...
...
The Date mapping function enables you to map elements by generating dates in specific formats. It also returns the current date and the difference between two dates. It comprises of various sub-functions, which are listed in the table below.
Info |
---|
All Date functions are applicable, only for XML Schemas at source and target. |
...
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Date | Date-Format | This is a customized mapping function. | date-format (employee/ 1998-03-31, 'yyyy-MM-dd', 'dd-MM-yyyy') |
| Date -Difference | Generates the | date-difference('12-08-2006','dd-MM-yyyy','12-08-2005', 'dd-MM-yyyy') |
| Current Date | Returns the current system date in Month-day-year format. | current date ('MM-dd-yyyy') |
...
Steps to map elements using the 'Date-Difference' Date Mapping Function
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Ensure that the source and target elements to be mapped are selected and displayed in the Mapping Graph Area.
You need to add a constant value for using this function. Once it is added, a Constant node with its value is displayed in Mapping Graph Area.
Info This function requires four inputs. The first input represents the value of Date1. The second input represents the value as the format of Date1. The third input represents the value as Date2. The fourth input represents the value as format of Date2. The Date1 and Date2 values can either be in the form of constants or XPath values. The formats of Date1 and Date2 are however always in the form of constants.
Click Date mapping function and select Date-Difference sub-function. A date-difference node is displayed in the Mapping Graph Area (see Figure 486).
Figure 486: Add Date-Difference Sub-Function Node
- Create a link from the output of the first constant value to the first input of the date-difference node.
- Create a link from the output of the second constant value to the second input of the date-difference node.
- Create a link from the output of the third constant value to the third input of the date-difference node.
- Create a link from the output of the fourth constant value to the fourth input of the date-difference node.
Create a link from the output of the date-difference node to input of the target element node (see Figure 487).
Figure 487: Create Links between Nodes for Mapping Elements using Date-Difference Function
- Click the Apply Mapping ( ) button. This maps elements by generating the difference between Date1 and Date2 using the date-difference sub-function.
...
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Aggregation | Sum | Returns total of all values under all nodes of the specified element. | Sum (Age) returns the sum of all Age elements under the specified node. |
| Count | Returns the total number of nodes for the specified element. | Count (Age) returns the total number of records under the Age element. |
| Position | Returns the position of the current context node in the specified element. | position() returns 1 for the first node, 2 for second node and so on. |
| Key | Returns matched records using two parameters: | Refer to the Using Key Function section. |
...
Steps to map elements using the 'Sum' Aggregation Mapping Function
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Ensure that the source and target elements to be mapped are selected and displayed in the Mapping Graph Area.
Click Aggregation function and select the Sum sub-function. A Sum node is displayed in the Mapping Graph Area (see Figure 488).
Figure 488: Add Sum Sub-Function Node
- Create a link from the output of the Source element to the input of the Sum node.
Create a link from the output of the Sum function node to the Target element (see Figure 489).
Figure 489: Create Links between Nodes for Mapping Elements using Sum Function
- Click the Apply Mapping ( ) button. This maps elements using the Sum sub-function. A line is displayed between the source and target panels showing the mapping of the source element to the target element.
...
Mapping Function
...
Sub-Functions
...
Description
...
Example
...
Conditional
...
IF Conditions
...
This function comprises of two sub functions:
...
...
For Filtering Records
...
Filters the records/elements on basis of the specified condition.
...
...
For Mapping To Elements
...
Returns a value if the specified condition is true.
...
IF CONDITION {#Age=25} Value= [100]
Returns 100 if the Age has the value of 25 in the source record.
...
...
When Condition
...
Returns a particular value if the specified condition is true, else it returns another value.
...
...
Select Query
...
This is a customized mapping function.
Returns the output based on the applied select query on a table in the any of the three databases (Oracle, Sql, IBM DB2).
Select Query supports single field selection and returns first matching record.
...
...
Sequence
...
This is a customized mapping function.
Returns integer values starting from the first argument and incrementing it by the second argument for each record. Both the arguments must be integer constants.
...
...
Append
...
This is a customized mapping function.
Appends the second string after the first string. Used to append only IF Condition.
...
Mapping Function
...
Sub-Functions
...
Description
...
Example
...
IF Condition
...
Nested IF
...
Contains IF condition inside the value of previous IF condition.
Returns output when all IF conditions are satisfied.
For example:
IF CONDITION {condition1} VALUE=[IF CONDITION {condition2} VALUE=[IF CONDITION {condition3} VALUE=[Value1]]]
Returns Value1 when all IF conditions are satisfied.
...
When Condition
...
Nested When
...
Contains When condition inside the value of previous When condition.
Returns varied output based on the When conditions being satisfied.
For example:
WHEN CONDITION {condition1} VALUE=[WHEN CONDITION {condition2} {VALUE=['value1'] OTHERWISE VALUE=['value2']] OTHERWISE VALUE=['value3']
Returns Value1 when both When conditions are satisfied.
Returns Value3 when the first When condition fails.
Returns Value2 when the first When condition is satisfied, but the second one fails.
...
IF and When Condition
...
IF and When conditions return Boolean
...
Returns value based on the function used as whether the condition returns True or False.
If a string or source element contains a character or group of characters, then True is returned, else False is returned. Based on the return value of the condition, the output value is generated.
For example:
WHEN CONDITION {contains (var1, str)} VALUE=[var2] OTHERWISE VALUE=[var3]
If var1 contains str, then True is returned, else False is returned.
If the condition returns True, then var2 is generated as output, else var1 is the output value.
...
IF and When Condition
...
Mixed
condition
...
Contains IF condition inside the value part of When condition or vice versa.
Returns varied output based on the conditions being satisfied.
For example:
WHEN CONDITION {condition1} VALUE=[IF CONDITION {condition2} VALUE=['value1']] OTHERWISE VALUE=['value2']
Returns Value1 when both conditions are satisfied.
Returns Value2 when the first condition fails.
Returns no output when the first condition is satisfied but second condition fails or when both conditions fail.
...
IF Condition
...
Multiple IF
...
Contains IF conditions placed sequentially, with each IF having its value part.
Two IF conditions are appended using Append sub-function of the String Function.
Returns varied output based on the condition being satisfied.
For Example:
IFCONDITION {condition1} VALUE=['value1'] IF CONDITION {condition2} VALUE=['value2']
Returns Value1 if condition1 is satisfied.
Returns Value2 if condition2 is satisfied.
...
When Condition
...
When condition with more than one conditions in it.
...
Contains When condition containing logical operators like and/not to make multiple conditions inside the When condition.
There are many permutations/combinations for this sub-function.
Example 1:
WHEN CONDITION (cond1 and cond2) Value = ['value1'] otherwise value = ['value2']
Returns Value1 if both conditions are satisfied, else returns Value2.
Example 2:
WHEN CONDITION (cond1 or cond2) Value = ['value1'] otherwise value = ['value2']
Returns Value1 when either one or both conditions are satisfied, else returns Value2.
...
IF Condition
...
IF condition with more than one conditions in it.
...
Contains IF condition containing logical operators like and/not to make multiple conditions inside the IF condition.
There are many permutations/combinations for this sub-function.
Example 1:
IF CONDITION (cond1 and cond2) Value = []
Returns Value1 when both conditions are satisfied, else no output is returned.
Example 2:
IF CONDITION (cond1 or cond2) Value = []
Returns Value1 when either one or both conditions are satisfied, else no output is returned.
...
Figure 490: Add Greater Than or Equal To Boolean Function Node
Info |
---|
To learn more about Boolean Functions, refer to the section Using Boolean Functions. |
...
Create a link from the output of the Constant node to the second input of the >= operator node (see Figure 491).
Figure 491: Create Links between Nodes for Mapping Elements using Greater Than Equal To Function
...
Click Conditional mapping function and select IF CONDITION sub-function. Further select For Mapping to Elements option. An IF CONDITION node is displayed in the Mapping Graph Area (see Figure 492).
Figure 492: Add IF Conditional Function Node
...
Figure 493: Creating Links between Nodes for Mapping Elements using IF Conditional Function
Info |
---|
If the value of SALARY element in the source data is greater than or equal to 5000, output will be 3000. If the value of TESTCASENO element in the source data is less than 100, output will be an empty tag. |
Click Apply Mapping ( ) button. This maps elements using IF CONDITION function. A line is displayed between source and target panels showing the mapping of the source element to the target element.
Info |
---|
This function simply filters the records based on the specified Boolean condition, but it does not create a data stream of the filtered records. You need to explicitly create the filtered data stream by creating another mapping (or adding same output schema in Target Panel) and using the IFF CONDITION () function based on the opposite Boolean condition. |
...
Mapping Function
...
Sub-Functions
...
Description
...
Example
...
Axis
...
File Path – XPath
...
This is a customized mapping function.
This is an XML Lookup which returns the value of the element/attribute within the XML file whose path is specified. The File path and XPath must be specified in single quotes.
...
Self
...
Returns the element which is the context node itself.
...
Child
...
Returns the element which is the child of the context node.
...
Parent
...
Returns the element, which is the parent (if any) of the context node.
...
Following-sibling
...
This axis contains all the following siblings of the context node. It returns the first occurrence of the element/attribute in the next sibling of the context node. If the context node is an attribute node or namespace node, then this axis is empty.
...
Ancestor
...
Returns the element which is the ancestor of the context node. This axis always includes the root node, unless the context node is the root node.
...
Ancestor-or-self
...
This axis contains the context node and the ancestors of the context node. It always includes the root node. It returns the context node or ancestors of the context node.
...
Preceding-sibling
...
This axis contains all the preceding siblings of the context node. It returns the first occurrence of the element/attribute in the preceding sibling of the context node. If the context node is an attribute node or namespace node, then this axis is empty.
...
Descendant
...
Returns the element which is the descendant of the context node. This axis does not contain attribute nodes.
...
Descendant-or-self
...
This axis contains the context node and the descendants of the context node. It returns the context node or descendants of the context node.
...
Generate-id
...
Generates a unique id for the element/attribute specified by the XPath argument.
...
Current
...
Removes all tags from the specified xml file and returns the data.
...
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Boolean
| Equal | Returns TRUE the first variable argument is equal to the second variable argument. | (5) = (5) returns true |
Not Equal | Returns TRUE the first variable argument is not equal to the second variable argument. | (5) != (50) returns true | |
Greater Than | Returns TRUE the first variable argument is greater than the second variable argument. | (5)> (3) returns true | |
Less Than | Returns TRUE the first variable argument is less than the second variable argument. | (5) < (8) returns true | |
Greater than Equal | Returns TRUE the first variable argument is greater than or equal to the second variable argument. | (5)>= (5) returns true | |
Less than Equal | Returns TRUE the first variable argument is less than or equal to the second variable argument. | (5) <= (8) returns true | |
Or | Returns TRUE if either of the two variable arguments evaluate to TRUE otherwise FALSE. These variable arguments can only be of Boolean data type. Hence, their value can either be TRUE or FALSE only. | (True) Or (True) returns true | |
And | Returns TRUE if both of the two variable arguments evaluate to TRUE otherwise FALSE. These variable arguments can only be of Boolean data type. Hence, their value can either be TRUE or FALSE only. | (True) And (True) returns true |
...
Mapping Function
...
Sub-Functions
...
Description
...
Example
...
Context
...
Set-Context
...
This is a customized mapping function.
Sets the value of the specified variable argument in the process flow context. This value can be string constant, numeric constant, XPath or output of limited set of mapping function, which can be used before set-context function.
This function does not return a value. If mapped to a target element, it creates an empty tag of that target element in output XML.
...
...
Get-Context
...
This is a customized mapping function.
Returns the value of the specified variable argument from process flow Context. This value can be string constant, numeric constant, XPath or output of limited set of mapping function. If no value has been set, then the value specified in the second argument is returned.
...
Using Set-Context Function
...
- Mapping Set-Context function using local variable
- Global declaration of Set-Context function
- Mapping Set-Context function to any target element
...
For example, if you want to set the value of process flow context variable based on the output of WHEN condition. The WHEN condition is used to return "True" when value of a source element "SALARY" is greater than 8000, else it will return "False". The output of WHEN condition is mapped to a local variable "BolSalary8K". To set the value of "BolSalary8K" to the process flow context variable, you can use Set-Context function. You have to create another local variable "Var1", where value of process flow context variable "ContextVar" is set using Set-Context function. This is done by mapping Set-Context to the value part of the local variable "Var1". The first argument of the Set-Context function is the name of the process flow context variable "ContextVar" and second argument is the local variable "BolSalary8K", which contains the output of WHEN condition.
Advantages
- Need not be mapped to a target element
- Local variable can be used as second argument of Set-Context function
- XPath of a source element can be used as second argument of Set-Context function
- Set-Context function is executed for each record of the source data
...
- Local Variable used to map set-context function will have an empty value.
...
Steps to pass output of mapping function or condition to a local variable
...
Enter the value of the local variable in the Local Variable Value field. In this example, you have to specify the WHEN condition as displayed in Figure 494.
Figure 494: Create Local Variable
...
Info |
---|
Second argument can be string constant, integer constant, XPath, local variable or output of limited set of mapping function, which can be used before Set-Context function. In this example, BolSalary8K variable is used as second argument of set-context function. |
...
- Easy to use
- Need not be mapped to a target element
- Need not create any local variable
...
- Local variable cannot be used in value part of Set-Context function
- If XPath of a source path is used, Set-Context function is executed for the first record only.
...
Click the Context Variables tab. The Context Variables pane is displayed (see Figure 496).
Figure 496: Context Variables Pane
...
Enter the value of process flow context variable in the Context Variable Value field (see Figure 497).
Figure 497: Enter Context Variable Value
...
Click No to save the context variable and shift focus to the other object. If you click Yes, then the defined context variable is cleared and the focus is shifted to the other object.
Info |
---|
You can also set the value of a context variable that is used in a particular condition. For example, if the context variable Var1 is used in an IFF condition in such a way the value of Var1 depends on the condition being True or False. If it is True then Var1 will have a different value. You can set this value of Var1 if the condition is True, using the Set Context function. |
Info |
---|
You can edit or delete a context variable from the Parameters Panel itself. For details, refer to the Managing a Global Variable from Parameter Panel section. |
...
- Need not to create any local variable
- Executed for each record
...
- Need an additional target element, whose value is not required at the target end
...
Click Context mapping function menu and select Set-Context sub-function. A set-context node is displayed in the Mapping Graph Area (see Figure 498).
Figure 498: Set-Context Node
...
Add another constant node for the second argument (e.g. 100) of the set-context function.
Info |
---|
Second argument can be string constant, integer constant, XPath, local variable or output of limited set of mapping function, which can be used before Set-Context function. |
...
Create a link from the output of the set-context node to the target element (see Figure 499).
Figure 499: Create Links between Nodes for Mapping Set-Context Function to Target Element
...
Click No to apply the mapping and shift focus to the other object. If you click Yes, then the mapping activity is cleared and is replaced by the previous mapping in the Mapping Graph Area and the focus is shifted to the other object.
Info |
---|
At times the mapping is too large and the applet memory may exceed 256M. In such cases, the mapping will fail and return an error of insufficient memory. You can overcome this situation by increasing the applet memory. For details, refer to Appendix A in the Administrator Guide. |
...
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
DB | DBQuery | Returns data from the database, based on a query. | DBQuery( 'select EmpID from EMP where EMPID=1035', var1, 'true') returns all the records from the EMP table, where EMPID is 1035. |
| PreparedQuery | Returns data from the database, based on a query. | PreparedQuery ('SELECT EMPID FROM EMP WHERE EMPNAME=? AND EMPCITY=? AND EMPISMALE=?, $oracle_databaseserver, true ,('Smith','Chicago','true')'). |
...
Steps to get data from the database using the 'DBQuery' DB Mapping Function
...
Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
...
Ensure that a Connection Info variable is created for the DBQuery and is listed in the Parameters Panel.
Info |
---|
For details on creating a Connection Info variable, refer to the Declaring Connection Info Variable section. |
...
Click the DB function and select the DBQuery sub-function. A DBQuery node is displayed in the Mapping Graph Area (see Figure 500).
Figure 500: Add DBQuery Sub-Function Node
...
Double-click the required Connection Info variable under Connection Info in the Parameters Panel. The selected Connection Info variable node is displayed in the Mapping Graph Area (see Figure 501).
Figure 501: Connection Info Variable in Mapping Graph Area
...
Create a link from the output of the DBQuery node to the input of the target element (see Figure 502).
Figure 502: Create Links between Nodes for Mapping DBQuery Function to Target Element
...
Click No to apply the mapping and shift focus to the other object. If you click Yes, then the mapping activity is cleared and is replaced by the previous mapping in the Mapping Graph Area and the focus is shifted to the other object.
Info |
---|
At times the mapping is too large and the applet memory may exceed 256M. In such cases, the mapping will fail and return an error of insufficient memory. You can overcome this situation by increasing the applet memory. For details, refer to Appendix A in Administrator Guide. |
...
Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
...
Ensure that a Connection Info variable is created for the PreparedQuery and is listed in the Parameters Panel.
Info |
---|
For details on creating a Connection Info variable, refer to the Declaring Connection Info Variable section. |
...
Click the DB function and select the PreparedQuery sub-function. A PreparedQuery node is displayed in the Mapping Graph Area (see Figure 503).
Figure 503: Add PreparedQuery Sub-Function Node
...
Double-click the required Connection Info variable under Connection Info in the Parameters Panel. The selected Connection Info variable node is displayed in the Mapping Graph Area (see Figure 504).
Figure 504: Connection Info Variable in Mapping Graph Area
...
Create a link from the output of the PreparedQuery node to the input of the target element (see Figure 505).
Figure 505: Create Links between Nodes for Mapping PreparedQuery Function to Target Element
...
Click the Apply Mapping ( ) button. This maps the PreparedQuery function to the target element. The defined query is passed to the database where a connection is created using the Connection Info variable. If the Boolean value is set as 'True' then the database fetches all the values that match the query. If the value is 'False', then the database fetches only the first matching value. If you shift focus to another node, or click any of the Mapping Rules, Textual Rules, Node, Properties, XSL or Debugger tabs, without applying the mapping, an alert message is displayed (see Figure 506).
Figure 506: Mapper Warning
...
Info |
---|
At times the mapping is too large and the applet memory may exceed 256M. In such cases, the mapping will fail and return an error of insufficient memory. You can overcome this situation by increasing the applet memory. For details, refer to Appendix A in Administrator Guide. |
...
Click String mapping function and select Concat sub-function. The syntax for the Concat sub-function is displayed in the Mapping Graph Area (see Figure 507).
Figure 507: Syntax for Concat Sub-Function
...
Figure 508: Parameters of the Concat Syntax
Info |
---|
You can indent the textual rule content as per your requirement. |
...
Steps to add a Namespace in the XSL
- Click the Actions menu and select Namespace.
Click the Namespace submenu and select Add Namespace. The Namespace dialog box is displayed (see Figure 509).
Figure 509: Adding Namespace
- Enter the Namespace and click OK. The Namespace is added to the XSL.
...
Info |
---|
The namespace added is shown in the XSL stylesheet tag. |
...
Click the Namespace submenu and select Edit Namespace. The Select Namespace screen is displayed (see Figure 510).
Figure 510: Select Namespace
...
Click OK to save the modifications.
Info |
---|
Similarly, you can view or remove an existing namespace. |
...
- Local: The XSL Templates defined within Local scope are available within the mapping activity, in which you have created the template.
- Global: The XSL Templates defined within Global scope are available within all the mapping activities. Once you create a global template in a mapping activity, you can use it in all the mapping activities.
- Group: The XSL Templates defined within Group scope are available only within the specific group.
...
- Mapping Rules: Enables you to use the predefined mapping functions.
- XSL Rules: Enables you to define the XSL Template code to use the defined parameters.
Steps to Create an XSL template using the XSL Rules
...
Select Manage XSL Template option or click the Manage XSL Template icon in the toolbar (Figure 511).
Figure 511: Data Mapper
The Manage XSL Template screen is displayed (see Figure 512).
Figure 512: Manage XSL Template
...
Select the scope of the XSl Template. The default scope of an XSl Template is Local.
Info |
---|
If you want to save the template as the Global Template, select the Global radio button. This will save the XSL template as Global XSL template and can be used in any mapping activity. In the Parameters panel, the XSL template will be displayed under the folder hierarchy Templates/Global. |
Info |
---|
You cannot change the scope of a XSL Template once you have saved the XSL template. The respective radio buttons become non-editable thereafter. |
...
Click the Add icon again to add the required parameters or press the Enter key to insert a new row. This will add a row immediately next to the row which is currently selected (see Figure 513).
Figure 513: Manage XSL Template: XSL Rules
Info |
---|
If you need to delete any row, select the respective row and click the Delete icon. |
Info |
---|
You can also define variables as the parameters of the XSL Template. To add a global variable, refer to the section Using Global Variable. |
...
Figure 514: Parameters Panel
Info |
---|
On saving the template, XSL validation is performed. If XSL is invalid, then an alert message is displayed specifying the line number and reason for error. |
Info |
---|
The name and parameters of the new XSL template are also displayed under the Templates list in the Parameters Panel. You can edit or delete an XSL template from the Parameters Panel itself. |
Info |
---|
To delete the active XSL template, click the Delete Template button. |
...
Steps to create an XSL template using the XSL Rules
- On the Manage XSL Template screen, click the Mapping Rules tab.
- Enter the name of the new XSL template that you want to create in the Name field.
- Select the scope of the XSL Template. The default scope of the XSL template is Local.
- Click the Add icon to add parameters for the new XSL template.
- Enter the name of the parameter you want to add, in the Parameter Name field.
- Click the Add icon again to add the required parameters or press the Enter key to insert a new row. This will add a row immediately next to the row which is currently selected.
Select the required Mapping Function. For example, select the mapping function, Math > Add (see Figure 515).
Figure 515: Manage XSL Template: Mapping Rules
The respective mapping function (add symbol for this example) is displayed in the Mapping template.
Figure 516: Mapping Template: Mapping Function Symbol
- Use the parameters that you have added in the previous steps.
Info If you need to delete any row, select the respective row and click the Delete icon.
- Click the Save button to save the Local XSL template. This displays the saved template under the Templates list on the XSL Template screen. The new XSL template is also displayed under Templates in the Parameters Panel.
Figure 517: Parameters Panel
Info |
---|
The name and parameters of the new XSL template are also displayed under the Templates list in the Parameters Panel. You can edit or delete an XSL template from the Parameters Panel itself. For details, refer to the Managing a Global Variable from Parameter Panel section. |
Map Elements using XSL Template
...
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Ensure that the source and target elements to be mapped are selected and displayed in the Mapping Graph Area.
Click the XSL template that you want to use for performing the required function, from the Templates list in the Parameters Panel. A Call XSL Template node is displayed in the Mapping Graph Area (see Figure 518).
Figure 518: Call XSL Template Node
- Create a link from the output of the first Source element to the first input of the Call XSL Template node.
- Create a link from the output of the second Source element to the second input of the Call XSL Template node.
Create a link from the output of the Call XSL Template function node to input of the Target element node (see Figure 519).
Figure 519: Create Links between Nodes for Mapping Elements using XSL Template
- Click Apply Mapping ( ) button. This maps elements using the Call XSL Template function node.
...
Global variables are used for mapping source elements, mapping functions or constants to target elements. They are declared and used globally for all target elements.
To use a global variable in a mapping activity, you need to map it to a target element. This will successfully execute the global variable when you execute the mapping activity in the process flow.
Info |
---|
A global variable differs from a context variable, in the respect that it is available only within the selected mapping activity. Context variables are available in the process designer too. |
...
Steps to declare a Global Variable
...
Click the Global Variables tab. The Global Variable pane is displayed in the Mapping Graph Area (see Figure 520).
Figure 520: Global Variable Pane
...
- Click required source element
- Select the required Mapping function
- Type the required value manually
Select a Custom Method
Info To select a Custom Method as the value of a global variable, double click the desired Custom Method under Custom Methods in the Parameters Panel. The selected Custom Method is displayed in the Variable Definition field.
To learn how to declare a Custom Method, refer to section Using Custom Method.
Enter comments for the global variable in the Add Comment field (see Figure 521). For example, if the global variable value contains complex XSLT logic, you can enter its description in this field.
Info |
---|
The Comments field is resizable. |
...
Click Save Global Variable ( ) button to save the global variable. This global variable is added to the list of existing variables in the Global Variable Name field. It is also displayed under Global Variables in the Parameters Panel. If you shift the focus to another node, or click any of the Mapping Rules, Textual Rules, Local Variables, Properties, XSL or Debugger tabs, without saving the global variable, an alert message is displayed. (see Figure 522). The comments added for the global variable are saved and displayed above the global variable declaration in the Mapping XSL (refer to Figure 523).
Figure 522: Alert Message
Info |
---|
For example, you have defined a global variable Var1, and you click the Name target element, without saving Var1, then the alert message is displayed. |
...
Figure 523: Comment in Mapping XSL
Info |
---|
You can rearrange the global variables by dragging it up or down in the list. |
Info |
---|
To remove a global variable, select the global variable and click Remove selected global variable ( ) button. |
...
Steps to manage a Global Variable from the Parameters Panel
Right-click the global variable that you want to edit or delete. This displays the right dropdown menu (see Figure 524).
Figure 524: Right-Click menu of Elements in Parameter Panel
- Select Edit to edit the variable. This displays the selected global variable in Edit mode. You can edit the value of the global variable in the Global Variable Value field. You can also edit the name of the global variable.
Alternately, select Remove to delete the selected variable. This displays a confirmation screen for the delete operation (see Figure 525).
Figure 525: Confirm Delete of Global Variable
- Click Yes to delete the selected variable.
...
Steps to map Global Variable to target element
...
Figure 526: Add Global Variable Node
...
Click No to apply the mapping and then shift the focus to the other object. If you click Yes, then the mapping activity is cleared and is replaced by the previous mapping in the Mapping Graph Area and the focus is shifted to the other object.
Info |
---|
Once a global variable is mapped to a target element, the letter (M) is displayed next to the mapped target element. This signifies that a target element has been mapped. Refer to Table of Suffixes for details on suffixes displayed next to a target element. |
Save the mapping activity and exit the Data Mapper.
Info |
---|
You can view and validate the generated mapping XSL, view the target XML and view and validate mapping output, before saving the mapping activity. |
...
Click the Local Variables tab. The Local Variable pane is displayed in the Mapping Graph Area (see Figure 527).
Figure 527: Local Variable Pane
...
- Click required source element
- Select the required Mapping function
- Type the required value manually
- Select a Custom Method
Enter comments for the local variable in the Add Comment field (see Figure 528). For example, if the local variable value contains complex XSLT logic, you can enter its description in this field.
Info |
---|
The Comments field is resizable. |
...
Info |
---|
To select a Custom Method as the value of a local variable, double click the desired Custom Method under Custom Methods in the Parameters Panel. The selected Custom Method is displayed in the Variable Definition field. |
...
Click the Save Local Variable ( ) button to save the local variable for the selected target element. This local variable is added to the list of existing variables in the Local Variable Name field. It is also displayed under Local Variables in the Parameters Panel. If you shift the focus to another node, or click any of the Mapping Rules, Textual Rules, Global Variables, Properties, XSL or Debugger tabs, without saving the local variable, an alert message is displayed (refer to alertmsg Figure 522). The comments added for the local variable are saved and displayed above the local variable declaration in the Mapping XSL (refer to Figure 523).
Info |
---|
The alert message is also displayed when shifting focus between Global and Node tabs. |
...
Click No to save the local variable and shift the focus to the other object. If you click Yes, then the defined local variable is cleared and the focus is shifted to the other object.
Info |
---|
Once the local variable is saved, it is categorized as Current Variable or Ancestor Variable in the Parameters Panel. If it is created for a child node, then it is saved as a Current Variable. If it is created for a parent's parent node, then it is saved as an Ancestor Variable. |
Info |
---|
You can rearrange the local variables by dragging it up or down in the list. |
Steps to manage a Local Variable from the Parameters Panel
...
Select Edit to edit the variable. This displays the selected local variable in Edit mode. You can edit the value of the local variable in the Local Variable Value field. You can also edit the name of the local variable in the Local VariableName field (see Figure 529).
Figure 529: Edit Name, Value and Comment for Local Variable
...
Click the Save Local Variable ( ) button to save the edited local variable. An alert message is displayed.
Figure 530: Alert Message
Click OK to save the changes.
Info |
---|
To remove a local variable, select the local variable and click Remove selected local variable ( ) button. |
...
Steps to map Local Variable to specific target element
...
Double-click the required local variable under Local Variables in the Parameters Panel. The selected local variable node is displayed in the Mapping Graph Area (see Figure 531).
Figure 531: Add Local Variable Node
...
Click No to apply the mapping and then shift focus to the other object. If you click Yes, then the mapping activity is cleared and is replaced by the previous mapping in the Mapping Graph Area and the focus is shifted to the other object.
Info |
---|
Once a local variable is mapped to a target element, the letter (LV) is displayed next to the mapped target element. This signifies that a local variable has been mapped to the target element. The letter (M) is also displayed indicating the target element has been mapped. Refer to Table of Suffixes for details on suffixes displayed next to a target element. |
Info |
---|
Local variables do not allow duplicate names at the same level. You need to right-click to edit the local variable, where you can select the source. |
Save the mapping activity and exit the Data Mapper.
Info |
---|
You can view and validate the generated mapping XSL, view the target XML and view and validate mapping output, before saving the mapping activity. |
...
- The package containing the custom java class must be copied in the folder <InstallFolder>/ServerKernel/customClasses.
...
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Click the Global tab displayed in the Mapping Graph Area. All tabs of the Global tab are displayed.
Click the Custom Methods tab. The Custom Methods pane is displayed (see Figure 532).
Figure 532: Custom Methods Pane
- Click the Add New Method ( ) button to add a Custom Method. A row is inserted with the listed columns as displayed in Figure 533:
- Alias
- Class (PKG)
- Method
- # Parameters
Figure 533: Add Custom Method - The value 'java' is automatically displayed in the Alias column. This is a read-only field.
- Click Alias field and then press Enter or Tab key to activate the Class (PKG) field.
- Enter the fully qualified name of the Java class in the Class (PKG) field and press Enter or Tab key to activate the Method field.
- Enter the name of the custom method in the Method column and press Enter or Tab key to activate the #Parameter field.
Enter the number of arguments taken by Method in the #Parameter column. A custom method can take any number of arguments. However, if you enter a value greater than 4, then a warning message appears (see Figure 534).
Figure 534: Warning for Adding more than 4 Parameters
- Click OK to close the message. This saves the custom method and displays it under Custom Methods in the Parameters Panel (see Figure 535).
Figure 535: Custom Method added to Parameters Panel
Info |
---|
To remove a custom method, select the custom method and click the Remove selected method ( ) button. |
...
Steps to map Custom Method to target element
...
Double-click the required custom method under Custom Methods in the Parameters Panel. The selected method node is displayed in the Mapping Graph Area (see Figure 536).
Info |
---|
If the custom method is defined with more than 4 parameters, then double-clicking the custom method will display the warning message (refer to Figure 534). Once you click OK, you need to define the mapping using Textual Rules. |
Figure 536: Add Custom Method Node
...
Create a link from the output of the custom method node to the input of the target element (see Figure 537).
Figure 537: Create Links between Nodes
...
Save the mapping activity and exit the Data Mapper.
Info |
---|
You can view and validate the generated mapping XSL, view the target XML and view and validate mapping output, before saving the mapping activity. |
...
Copy all the class files in the Custom Classes folder and then restart the kernel.
Info |
---|
The current implementation of Global Methods does not support package hierarchy. So all class files that are directly placed in the Custom Classes folder, will be visible through the Global Methods node in the Parameters Panel. |
...
Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes. The Global Methods node is already displayed in the Parameters Panel, each time Data Mapper is opened (see Figure 538).
Figure 538: Global Methods Node
...
Expand the Global Methods node to display all the class files present in the Custom Classes folder (see Figure 539).
Figure 539: List of Class Files in Custom Classes Folder
...
Figure 540: Custom Methods in a Custom Class
Info |
---|
You can view more information (such as return type and parameter types) about a custom method as a tooltip, by placing the cursor over the custom method node. |
...
The Key function is used to extract information from two or more related input data sources. For example, if there are two input data sources: source1 and source2, then the Key function will extract information from source2 based on the matching field from source1.
Key function is always created in context of source2 (the data source from where data needs to be fetched based on matching field ). All the parameters of the Key function correspond to source2 only. It has the following 3 parameters:
- Key Name : It is a name that you want to give to the Key function (for example, Key1))
- Key Match : It is the XPath of source2 that will be returned as output by the Key function . This XPath is assumed to be present in the source2 . A valid Xpath needs to be specified as this path will be returned as output. A schema name cannot be used here in the Xpath.
- Key Use: It is the name of the field from source2 which will be used to find the matching record from source2 based on the value passed to Key function. For example, if the Key Match is /Root/Record and Key Use is EmpID, and if we pass value 25 to the Key function , then it will start scanning EmpID of the source2 inside each record of source2. Whenever EmpID=25, the Key function will pass that record (Root/Record) as output.
...
- Key Name: Key1
- Key Match: /Root/Record
- Key Use: EmpID
...
Steps to create a key
...
Click the Key Functions tab. A list of existing keys is displayed in the Key Functions pane (see Figure 541).
Figure 541: Key Functions Tab
...
Enter the path of the source element (at the root node) to be matched, in the Key Match field. The path always starts with a '/'.
Info |
---|
Here in the field, you need not to enter the complete Xpath. In path you need to enter only the Root and Record. For example /Root/Record. |
...
Enter the name of the field to be matched in the Key Use field for example EMPID.
Info |
---|
The Key Match and the Key Use fields are case-sensitive. |
...
Click Save Key ( ) button to save the key. This key is added to the list of existing keys in the Key Function tab. It is also displayed under Keys in the Parameters Panel. (see Figure 542).
Figure 542: Key Added to Parameters Panel
...
If you shift focus to another node, or click any of the Mapping Rules, Textual Rules, Properties, XSL or Debugger tabs, without saving the key, an alert message is displayed (refer to Figure 522).
Info |
---|
The alert message is also displayed when shifting focus between the Global and Node tabs. |
Click No to save the key and shift the focus to the other object. If you click Yes, then the defined key is cleared and focus is shifted to the other object.
Info |
---|
You can rearrange the keys by dragging it up or down in the list. |
Info |
---|
You can edit or delete a key from the Parameters Panel itself. For details, refer to the Managing a Global Variable from Parameter Panel section. |
...
Map source and target elements as displayed in figure below (see Figure 543).
Figure 543: Map Source and Target Elements
...
Click the Aggregation mapping function and select the Key sub-function. The Key function is displayed in the Textual Rules pane (see Figure 544).
Figure 544: Key Function
...
Append the name of the element (Address), of the source2 schema, which needs to be mapped to the target element (Address).
Now the syntax of the mapping will be displayed as:
key ("key1" , $ VarEmpidSource1)/Address (see Figure 545)
Figure 545: Map Key Function Node to Target Element
...
Save the mapping activity and exit the Data Mapper.
Info |
---|
You can view and validate the generated mapping XSL, view the target XML and view and validate mapping output, before saving the mapping activity. |
...
- Connection Info variables are used as a parameter in the DBQuery function, when extracting information from the database.
Steps to declare a Connection Info Variable
...
Click the Connection Info tab. The Connection Info Variable pane is displayed in the Mapping Graph Area (see Figure 546).
Figure 546: Connection Info Variable Pane
...
Select the DBInfo name that you want to assign for the Connection Info variable (see Figure 547).
Info |
---|
You can click Synchronize to reload the DBInfo list. |
Figure 547: Enter Connection Variable Value
...
Click No to save the Connection Info variable and shift the focus to the other object. If you click Yes, then the defined Connection Info variable is cleared and the focus is shifted to the other object.
Info |
---|
You can rearrange the Connection Info variables by dragging it up or down in the list. |
Info |
---|
You can edit or delete a Connection Info variable from the Parameters Panel itself. For details, refer to the Managing a Global Variable from Parameter Panel section. |
...
Click the Properties tab. The Properties pane is displayed (see Figure 548)
Figure 548: Properties Pane
...
Property | Description |
---|---|
XPath | Displays the XPath of the selected target element. It is a read-only field. |
For Each | Sets the For Each property for the target element. It is used to repeat occurrences of a target element depending on the total occurrences of a source element in the source file. To set the For Each property refer to the section Setting the For Each Property. |
Sorting | Sets the Sorting rules for the target element. It also allows you to view or remove sorting rules for the target element. To set the Sorting Rules, refer to the section Setting Sorting Rules. |
Disable-Output-Escaping | Sets the disable-output –escaping property for the target element. It is used to include this property under the 'value-of' element in the generated XSL. By default, this property is set as 'no'. For details on this property, refer to the section Using XSL Property. |
Comments | Displays comments entered for the target element. This is a data entry field and allows you to enter comments for the target element. To enter comments, refer to the section Adding Comments for Target Element. |
...
Info |
---|
If For Each property is not used, an output file is generated with only one occurrence of customer in it. |
...
Click the For Each property field and then double-click the source element using which you want to apply the For Each property. This displays the entire path of the source element in the For Each field (see Figure 549).
Figure 549: Source Element in For Each Property
Info |
---|
You can set the For Each property on more than one source element. You can use the character as a separator between the XPath of each source element. |
...
Click No to save the For Each property and shift focus to the other object. If you click Yes, then the defined For Each property is cleared and the focus is shifted to the other object.
Info |
---|
Once the For Each property is applied to a target element, the letter (F) is displayed next to the target element. Refer to Table of Suffixes for details on suffixes displayed next to a target element. |
Info |
---|
To remove the For Each property from the target element, right-click target element and select Remove Mappings option. This displays the Remove Mapping Options dialog box. Select the Remove For Each checkbox and click OK. |
...
Click the Comments property field and enter the comment for the selected target element (see Figure 550).
Figure 550: Enter Comment
...
Click No to save the comments and shift focus to the other object. If you click Yes, then the defined comments are cleared and the focus is shifted to the other object.
Info |
---|
Once a comment is added to a target element, the letter (CM) is displayed next to the target element. This signifies that a comment has been created for the target element. Refer to Table of Suffixes for details on suffixes displayed next to a target element. |
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" ?>
- <employees>
- <employee attribute="14" attribute1="15">
<TESTCASENO>TESTCASENO1</TESTCASENO>
<DESCRIPTION>DESCRIPTION1</DESCRIPTION>
<NAME>John</NAME>
<ADDRESS>Address1</ADDRESS>
<EMAILID>EMAILID1</EMAILID>
<PHONENO>PHONENO1</PHONENO>
<DOB>DOB1</DOB>
<DEPT>DEPT1</DEPT>
<SALARY>10000</SALARY>
<DOJ>DOJ1</DOJ>
<DESIGNATION>DESIGNATION1</DESIGNATION>
<AGE>34</AGE>
</employee>
- <employee attribute="14" attribute1="15">
<TESTCASENO>TESTCASENO2</TESTCASENO>
<DESCRIPTION>DESCRIPTION2</DESCRIPTION>
<NAME>David</NAME>
<ADDRESS>ADDRESS2</ADDRESS>
<EMAILID>EMAILID2</EMAILID>
<PHONENO>PHONENO2</PHONENO>
<DOB>DOB2</DOB>
<DEPT>DEPT2</DEPT>
<SALARY>8000</SALARY>
<DOJ>DOJ2</DOJ>
<DESIGNATION>DESIGNATION2</DESIGNATION>
<AGE>45</AGE>
</employee>
- <employee attribute="14" attribute1="15">
<TESTCASENO>TESTCASEN3</TESTCASENO>
<DESCRIPTION>DESCRIPTION3</DESCRIPTION>
<NAME>Ricky</NAME>
<ADDRESS>ADDRESS3</ADDRESS>
<EMAILID>EMAILID3</EMAILID>
<PHONENO>PHONENO3</PHONENO>
<DOB>DOB3</DOB>
<DEPT>DEPT3</DEPT>
<SALARY>15000</SALARY>
<DOJ>DOJ3</DOJ>
<DESIGNATION>DESIGNATION3</DESIGNATION>
<AGE>36</AGE>
</employee>
</employees> |
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" ?>
- <employees xmlns:java="http://xml.apache.org/xslt/java" xmlns:str="http://exslt.org/strings">
- <employee attribute="" attribute1="">
<TESTCASENO>TESTCASEN3</TESTCASENO>
<DESCRIPTION>DESCRIPTION3</DESCRIPTION>
<NAME>Ricky</NAME>
<ADDRESS>ADDRESS3</ADDRESS>
<EMAILID>EMAILID3</EMAILID>
<PHONENO>PHONENO3</PHONENO>
<DOB>DOB3</DOB>
<DEPT>DEPT3</DEPT>
<SALARY>15000</SALARY>
<DOJ>DOJ3</DOJ>
<DESIGNATION>DESIGNATION3</DESIGNATION>
<AGE>36</AGE>
</employee>
- <employee attribute="" attribute1="">
<TESTCASENO>TESTCASENO1</TESTCASENO>
<DESCRIPTION>DESCRIPTION1</DESCRIPTION>
<NAME>John</NAME>
<ADDRESS>Address1</ADDRESS>
<EMAILID>EMAILID1</EMAILID>
<PHONENO>PHONENO1</PHONENO>
<DOB>DOB1</DOB>
<DEPT>DEPT1</DEPT>
<SALARY>10000</SALARY>
<DOJ>DOJ1</DOJ>
<DESIGNATION>DESIGNATION1</DESIGNATION>
<AGE>34</AGE>
</employee>
- <employee attribute="" attribute1="">
<TESTCASENO>TESTCASENO2</TESTCASENO>
<DESCRIPTION>DESCRIPTION2</DESCRIPTION>
<NAME>David</NAME>
<ADDRESS>ADDRESS2</ADDRESS>
<EMAILID>EMAILID2</EMAILID>
<PHONENO>PHONENO2</PHONENO>
<DOB>DOB2</DOB>
<DEPT>DEPT2</DEPT>
<SALARY>8000</SALARY>
<DOJ>DOJ2</DOJ>
<DESIGNATION>DESIGNATION2</DESIGNATION>
<AGE>45</AGE>
</employee>
</employees> |
Info |
---|
The Sorting rules can be set only for record where For Each Mapping or Apply Template is used. The <xsl:apply-templates> element applies a template to the current element or to the child nodes of the current element, when the parent elements of source and target schemas are mapped. |
...
To use Apply template, click Employee (parent) element in the source panel and drag the mouse pointer to the Employee (parent) element in the target panel. A line is displayed between the source and target panels indicating the mapping between source and target elements (see Figure 553).
Figure 553: Apply Template
Info |
---|
To learn how to set For Each property on employee element refer to the section Setting For Each Property. |
...
Click the Click here to add/view Sorting Rules option displayed against the Sorting property field. This displays the Add New Sorting Rules dialog box (see Figure 554).
This screen displays the name of the selected target record to be sorted.
Figure 554: Sorting Rules Dialog Box
...
Click Close to return the Data Mapper screen. The letter (SR) is displayed next to the sorted target element. This signifies that the target element has been sorted based on the specified source element. Refer to the [Table of Suffixes|Using Data Mapper#suffixestable] for details on suffixes displayed next to an element.
Info |
---|
More than one sorting can also be applied to a single target element. For example, if salary of two employees is same, they can be further sorted out based on their age. |
...
Using IFF Condition
- Using Apply Filter checkbox from right-click popup menu
Info |
---|
The Apply Filter checkbox method is recommended as it is easy to use and can be done individually on multiple nodes, directly from the data mapper applet. |
...
Right-click the target element that you want to filter, and mark the Apply Filter checkbox as checked (see Figure 555). By default, this checkbox is disabled.
Figure 555: Checking Apply Filter Checkbox
This selection will filter the selected element from the target output XML data. You can uncheck this checkbox anytime to display the element in the target data.
Info |
---|
You can apply this filtering option on the element or attribute levels. Once the filter is applied on the target element, the letters (FL) are displayed next to each filtered target element. This signifies that the filter has been applied for the target element. Refer to Table of Suffixes for details on suffixes displayed next to an element. |
...
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
Right-click the target element and select the CloneNode option.
Info You can create a clone of all target nodes except the root node. Thus, the Clone Node sub-option is displayed as inactive for the root node.
- The element which is created using cloning is displayed with the suffix [1] after its name. Subsequent clones that are created for that element will have the suffix [2] and so on. You can create a maximum of 300 occurrences of an element, with one main element and 299 clones.
...
Right-click the cloned element that you want to remove and select the Remove Clone option. A screen is displayed confirming the removal of the selected clone (see Figure 556).
Figure 556: Confirm Remove Clone
Click Yes to remove the clone. This removes the selected clone from the target schema.
Info |
---|
If more than one clone has been created for an element, then you need to remove the clones in descending order. |
...
The XML parsers normally parse the complete text in an XML document i.e., when an XML element is parsed, the text data between the XML tags is also parsed. Consider the following example:,
<message>This text will also be parsed</message>
In this example, the message between the <message> and </message> text will normally be parsed by the XML parser. Consider another example:
<name><first>Hello</first><last>User!</last></name>
In this example also, the XML parser will break the XML tags and parse the text data as Hello User!
The text data that is parsed by the XML parser is termed as Parsed Character Data or PCData.
However, the user may require to add some text data that should not be parsed by the XML parser. The Character Data or CData is the text data that should not be parsed by the XML parser. CData is also termed as Unparsed Data.
Adeptia Suite enables you to add a CData section with the target schema. The text data inside a CDATA section is ignored by the parser.
A CDATA section starts with "<![CDATA[" and ends with "]]>". CDATA sections are useful for writing XML code as text data within an XML document.
Info |
---|
A CDATA section cannot contain the string "]]>" and therefore it is not possible for a CDATA section to contain nested CDATA sections. |
...
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
Click Actions menu and select the option CData Section Elements (see Figure 559).
Figure 557: CData Section Elements
- The CData Section Elements dialog is displayed (see Figure 558).
Figure 558: CData Section Elements Dialog
...
You can remove a schema from the source or target panels. If a source or target schema is removed, everything associated with the mapping of the schema such as Mapping Graph Area, Connection Lines or For Each property is removed.
Steps to remove a schema
...
Figure 559: Confirm Remove Schema
Click Yes to remove the schema. This removes the selected clone from the target schema.
Info |
---|
A schema can be removed only from the root element. Thus, the Remove Schema option is displayed as active only for the root element. |
...
Right-click the target element and select the Custom XSL Before option (see Figure 560).
Figure 560: Select Custom XSL Before Option
...
The Add Custom XSL Before screen is displayed for the target element. Enter the custom XSL code for the target element (see Figure 561).
Figure 561: Enter Custom XSL Code
Click Save to save the XSL code and close the screen. Alternately, click Clear to clear the XSL code, or Cancel to close the screen without saving the changes.
Info |
---|
Similarly, you can add custom XSL code after a target element, by selecting Custom XSL After option from the right menu (refer to Figure 560). |
...
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
Click the Actions menu and select Global Custom XSL Before option (see Figure 562).
Figure 562: Select Global Custom XSL Before Option
The Add Global Custom XSL Before screen is displayed. Enter the global custom XSL code (see Figure 563).
Figure 563: Enter Global Custom XSL Code
Click Save to save the XSL code and close the screen. Alternately, click Clear to clear the XSL code, or Cancel to close the screen without saving the changes.
Info Similarly, you can add global custom XSL code after mapping XSL, by selecting Global Custom XSL After option from the Actions menu (refer to Select Global Custom XSL Before Option screen).
- Once you have entered the custom XSL code, it is saved in the Mapping XSL screen (see Figure 564).
Figure 564: Custom XSL Code in Mapping XSL
...
You can change the root element when XML schemas are loaded. The root element always appears as a tag in the Output section on the Debugger screen. You can change this tag by selecting the desired root element.
Steps to select root element of a schema
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Right-click the root element of the schema whose root element you want to change and select the Select Root option.
- The Select Root Element screen is displayed.
- This screen displays a list of existing root elements for the selected schema in a dropdown list (see Figure 565).
Figure 565: Select Root ElementInfo All elements that are declared as global in the XSD are listed in this dropdown list.
Select the root element that you want to change from the Select Root dropdown list and click OK. A screen is displayed confirming the change of the root element (see Figure 566).
Figure 566: Confirm Change of Root Element- Click Yes to change the root element. This changes the root element and displays the selected root element.
Info |
---|
The Select Root sub-option is displayed as active only for the root element. |
...
You can add a namespace prefix to a target element. This prefix is displayed next to the target element in the target schema, and is automatically displayed in the Output section on the Debugger screen.
Steps to add a namespace prefix to a target element
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
Right-click the element of the target schema for which you want to add a namespace prefix and select the Add Namespace Prefix option.
The Add Namespace Prefix screen is displayed (see Figure 567).
Figure 567: Add Namespace Prefix- Enter the namespace prefix and click OK. This adds the prefix and displays it next to the selected target element in the target schema.
Info |
---|
Once you add a namespace prefix for a target element, you need to add a namespace for it. To do this, refer to Adding Namespace section. |
...
- Click the Actions menu.
Select the sub-menu Exclude Result Prefixes. The Exclude Result Prefixes screen is displayed (see Figure 568).
Figure 568: Exclude Result Prefixes Dialog
- Enter the prefix that you want to exclude from the output section on the Debugger screen.
Info |
---|
To exclude more than one namespace prefixes, enter the namespace prefixes separated by a white space in the Exclude Namespace Prefix textbox and click OK. The excluded namespaces will then not be automatically displayed in the Output section on the Debugger screen. |
...
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
Right-click the extension element of the schema whose element hierarchy you want to change and select the Extension Element option.
Info The Extension Element sub-option is displayed as active only for the extension element.
The Select Extension Element screen is displayed (see Figure 569). This screen displays a list of extension element type.
Figure 569: Select Extension Element
Select the required extension type that you want to load from the Select Extension Element dropdown list and click OK. A screen is displayed confirming the change of extension element (see Figure 570).
Figure 570: Confirm Change of Extension Element
- Click Yes to change the extension element. The selected hierarchy will be loaded.
Anchor
You can use the Data Mapper tool to map source schema elements to target schema elements. You can map one source schema element to a target schema element directly by drag and drop method. Additionally, this tool also offers certain mapping functions using which you can map source and target schema elements. Furthermore, the Data Mapper supports multiple source and target schemas. This implies that you can select more than one schema at a time, both at the source and the target end. This facilitates mapping of multiple source and target schema elements.
Following are the major subsections:
Section Name | Description |
---|---|
Accessing Data Mapper | Introduces Data Mapper user interface. |
Mapping Elements | Learn how to map elements in the Data Mapper. |
Introduction to Data Viewer and its usage. | |
Viewing Mapping in PDF format | Know how to view mapping activity in PDF format. |
View Mapping in Read-Only Mode | Learn how to view and manage mapping activity in read-only mode. |
Splitting Source Data | Introduces Splitting concept and step-by-step instructions to split source data are also provided. |
Set Splitter XPath | Introduces Splitter XPath concept and instructions to set Splitter XPath are also provided. |
Enabling Quick Splitting | Step-by-step instructions to split source data using Quick Splitting, viewing and removing Splitter XPath. |
Set Merger XPath | Introduces Merger XPath concept and instructions to set, view, and remove Merger XPath are also provided. |
Assign Data Streams | Learn how to assign streams to the root element of the target schema structures. |
Remove Mapping of an Element | Learn how to remove mapping associated with a particular element. |
Using Context Schema | Introduction to Context Schema and its usage to map context variable. |
Using Mapping Functions | Know about various inbuilt mapping functions available in the Data Mapper. Learn how to map source and target schema elements using mapping functions. |
Using DB Function | Learn how to fetch data from database using various DB Mapping functions. |
Using Textual Rules | Step-by-step instructions to map elements using Textual Rules. |
Using Namespace | Step-by-step instructions to add and edit Namespace in XSL. |
Using XSL Template | Introduction to XSL template and step-by-step instructions to create XSL template using Mapping Rules and XSL rules are also provided. |
Using Global Variable | Introduces Global Variable concept, declaration, managing global variable from Parameters panel, and mapping global variable to target element. |
Using Local Variable | Introduces Local Variable concept, declaration, managing local variable from Parameters panel, and mapping local variable to specific target element. |
Using Custom Methods | Introduces Custom Method concept, declaration, and mapping custom method to target element. |
Learn how to load custom methods dynamically. | |
Using Key Function | Introduction to Key Function. |
Declaring Connection Info Variable | Learn how to declare connection info variable. |
Setting Target Element Properties | Learn how to set the properties and add comments to the target element. |
Learn how to filter elements or attributes appearing in the target XML using Apply Filter check box. | |
Creating Clone of Target Element | Learn how to create and remove the clone of a target element. |
Introduction to CData and step-by-step instructions to add CData are also provided. | |
Removing Schema | Learn how to remove schema from source or target panels. |
Adding Custom XSL | Learn how to add custom XSL code to a target element. |
Select Root | Learn how to select the root of a schema. |
Adding Namespace Prefix | Learn how to add a namespace prefix to a target element. |
Excluding Result Prefixes | Learn how to exclude namespace prefix from the Output screen. |
Populating extension type element | Learn how to select extension type element. |