Altova MapForce 2022 Basic Edition

This topic explains how to validate mappings. The topic also shows how to preview, save and validate your output.

 

Validate mappings

MapForce validates mappings automatically when you click the Output pane. You can also validate your mapping manually, which can help you identify and correct potential errors and warnings before running the mapping. To validate a mapping manually, click the Mapping pane and then do one of the following:

 

Click Validate Mapping in the File menu.

Click ic-val-mapping (Validate) in the toolbar.

 

When you validate a mapping, MapForce checks, for example, for unsupported component types, incorrect or missing connections. To find out more about validation statuses, see Messages Window. The Messages window also allows you to take message-related actions. To display the result of each validation in an individual tab, click the numbered tabs available on the left side of the Messages window. This may be useful, for example, if you work with multiple mapping files simultaneously.

 

Validation of transformation components

Validation of transformation components works as follows:

 

If a mandatory input connector is not connected, an error message is generated, and the transformation is stopped.

If an output connector is not connected, a warning is generated, and the transformation process continues. The component, which has caused the warning, and its data are ignored and not mapped to the target.

 

Preview and validate output

MapForce allows you to preview the output without having to run and compile the generated code with an external processor or compiler. In general, it is a good idea to preview the transformation output in MapForce before processing the generated code externally. When you preview the mapping results, MapForce executes the mapping and shows the output in the Output pane.

 

Once the data is available in the Output pane, you can validate and save it if necessary. For more information, see Validation. You can also use the Find command (Ctrl + F) to quickly locate a particular text pattern in the output file. For more information, see Text View Search. Any error, warning or information messages related to the mapping execution are displayed in the Messages window.

 

If you select C++, C#, or Java (Professional and Enterprise editions) as a transformation language, MapForce executes the mapping using its built-in transformation engine and displays the result in the Output pane.

 

To save the transformation output, click the Output pane and then do one of the following:

 

Click Save Output File in the Output menu.

Click MF_SaveGenOutput (Save generated output) in the toolbar.

 

Load options

When you preview large output files, MapForce limits the amount of data displayed in the Output pane. In this case, the Load more button appears in the lower area of the pane (see screenshot below). Clicking the Load more button adds the next piece of data. You can configure the preview settings from the General tab of the Options dialog box. For more information, see MapForce Options.

MF_MapFund_GeneralFeat_Validate1

Validate output

As soon as the output becomes available in the Output pane, you can validate the output against the schema associated with it. Note that the Validate Output button and its corresponding menu command (Output | Validate Output File) are enabled only if the output file supports validation against a schema. The result of the validation is displayed in the Messages window. To validate the output, do one of the following:

 

Open the Output pane and click ic-validate (Validate Output) in the toolbar.

Open the Output pane and click Validate Output File in the Output menu.

 

The screenshot below illustrates unsuccessful validation. The Messages window contains detailed information on the errors. For example, if you click the <Name> link, MapForce will highlight this element in the Output pane.

MF_MapFund_GeneralFeat_Validate2

 

© 2016-2022 Altova GmbH