User Guide : Validating Data : Validating Data In Map Editor
 
Share this page             
Validating Data In Map Editor
After you have created, edited, and saved the document schema file, you can use this file in mapping and transformations in a map. The schema file provides the metadata that you can apply to structure your data.
Validating target data in Map Editor involves creating and using EZscripts. Target validation templates are partial transformations that typically connect to null sources and allow you to pre-define a target schema and add business rule logic that evaluates the results of a target field. This means that you can preset constraints on a target field without connecting to, or even knowing the source data type. You can also predefine the source ClearMapPut Record events.
The logic for target validation templates is written as EZscript code within the Validation Rules in Target tree node on the Map All tab. Once the validation logic exits, add the Validate Record action to the BeforePutRecord event of the target record you want validate. This runs the validation logic before writing a target record.
To use the sample data file in a map:
1. Make sure you have a sample data file available. For more information, see Creating Sample Data File.
2. In Project Explorer, open a map file.
The map file opens in map editor.
3. On the Sources tab, select the source connector as HL7, HIPAA, or EDI and specify the sample data file as the source file.
4. In the Properties section, for SchemaFile, click and specify the related document schema file. If required, you can also specify the other properties. For more information, see Setting Up Source Data and Setting Up Target Data.
5. Click Connect.
The source connection is established.
6. Click Browse Data icon to view the schema file contents.
7. Click the Targets tab, select the target connector as Ascii Delimited (an example), specify a new file as the target file and click Connect.
The target connection is established.
8. Click the Mapping tab and map the target fields.
9. Click to validate the map.
The validation is successful message is displayed.
10. Click to run the map
The target data is generated.
11. Click the Targets tab and click on Browse Data icon to view the target file contents.