Save Mapping and Exit Data Mapper

Once you have mapped source and target elements, you can save the mapping and exit the Data Mapper. 


Steps to save the mapping and exit the Data Mapper

  1. 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)

  2. Enter comments in the textbox Specify comments for mapping object<object name>.

    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.

  3. Click OK to save the comments. This displays a dialog box confirming that the mapping has been saved successfully.
  4. 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

  5. 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

  6. 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).
  7. Enter comments in the Specify comments for mapping object <object name> field.
  8. 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.
  9. Refresh the Internet browser to view the saved mapping activity.

    At times, on saving a mapping activity, the memory usage may exceed its actual capacity depending on the JVM and the operating system.

View and Validate Generated Mapping XSL 

This is a very useful feature of the Data Mapper. It enables you to validate and test the generated XSL before saving the mapping activity. 

Steps to view and validate the generated mapping XSL

  1. 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

  2. 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.

    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.

  3. Click OK to close the above dialog box.

    You can also validate the generated XSL from the Create Data Mapping screen. For more details, refer to the section Splitting Source Data. 

     

    View Mapping XML

    The Data Mapper allows you to view the generated XML code, before saving the mapping activity. 

    Steps to view Mapping XML

  1. 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

View and Validate Mapping Output

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

  1. 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

    This screen is divided into five sections as listed in the table below. 
    Table 9 : Options of the 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: 
    Variables 
    Params 
    The Variables tab displays the local variables that are encountered in the generated XSL. 
    The Params tab displays all parameters that are defined for a XSL template. These parameters are displayed only if that XSL template is used in the mapping activity.

    Errors

    Displays all errors encountered during debugging.

     

  2. Click the Generate Input Mock up Data button displayed in the Input section, to generate the sample input data in XML format. The sample input data contains name of the element as XML Tags and some randomly generated values as their data. The sample input XML file is displayed in the Inputsection (see Figure 448).


    Figure 448: Generate Mockup Data

    Data will be generated for all input schemas.

  3. Alternately, you can attach a source file to the root element of the source schema. Right-click the root element of the source schema and select Attach Source from the dropdown list. Select the source file to attach it. This automatically converts the actual data of the source file into XML input data, which can be validated.
  4. 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.

    Another way of uploading the XML file is right-clicking the Input section and clicking the Load option.

    If you load an XML file, then the existing XML code is overwritten. It is not appended.

  5. Click the Save button (  ) displayed in the Input section to save the generated input data.

    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.

    While simulating on the server using context variables, if you assign a value to the context variable using the Set Context function and retrieve its value using the Get Context function, it will return the default value of the context variable, instead of the new value assigned. For example, a context variable ‘Var1’ has the default value as 10 and is later assigned the value of 20 by Set Context function. When the Get Context function is used to retrieve the value of the variable, it returns 10 instead of 20.

  6. Select the radio button Run on Server if you want to simulate the mapping activity on the server.
  7. Click the Start Execution button displayed in the Output section to generate sample output data based on input data. The generated sample output data is displayed in the Output section (see Figure 449).


    Figure 449: Output XSL

    You can stop the generation of output data at any time by clicking the Stop button displayed in the XSL section.

    In case XML Schema is used at target end, then unmapped elements are filtered out automatically.

  8. Click the Save button (  ) displayed in the Output section to save the generated mapping output.
  9. A dialog box is displayed using which you can save the XML file at the desired location.