Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. XMap
  7. Libraries
  8. Schema Object
  9. Command Line Interface
  10. Scripts
  11. Parsers
  12. Script Ports
  13. Document Processors
  14. Formats
  15. Data Holders
  16. Anchors
  17. Transformers
  18. Actions
  19. Serializers
  20. Mappers
  21. Locators, Keys, and Indexing
  22. Streamers
  23. Validators, Notifications, and Failure Handling
  24. Validation Rules
  25. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

Example Sources

Example Sources

An example source is a document that contains sample input data for the Script to process during design time. You configure an example source for each Parser, Mapper, Serializer, or additional input port. The example source contains the same type of data that the Data Processor transformation receives from an input port.
By default, the
Data Viewer
view displays the example source defined for the startup component. You can also view the example source of any other component that defines an example source. When you run a Script from the
Data Viewer
view, the Data Processor transformation reads the example source documents.
You can configure the following types of example source document:
  • LocalFile. A file on the local file system.
  • Text. A string hard-coded into the Script.
  • URL. A file on the local network or the Internet.
When you run a Script in a mapping and an input document is missing, the transformation uses the example source. If no example source is configured and there is no input document, the Data Processor transformation halts and generates a fatal error.

Example Source Example

The following sample text illustrates a part of a local file that you might use for an example source when you parse HL7 documents:
MSH|^~\&|ADT1|MCM|FINGER|MCM|198808181126|SECURITY|ADT^A01|MSG00001|P|2.3.1 EVN|A01|198808181123 PID|1||PATID1234^5^M11^ADT1^MR^MCM~123456789^^^USSSA^SS|| SMITH^WILLIAM^A^III||19610615|M||C|1200 N ELM STREET^^JERUSALEM^TN^99999? 1020|GL|(999)999?1212|(999)999?3333||S||PATID12345001^2^M10^ADT1^AN^A| 123456789|987654^NC NK1|1|SMITH^OREGANO^K|WI^WIFE||||NK^NEXT OF KIN PV1|1|I|2000^2012^01||||004777^CASTRO^FRANK^J.|||SUR||||ADM|A0