Using the Restart attribute

The Restart attribute provides instructions for handling errors encountered in a data stream. The Restart attribute gets assigned to a component and takes effect during data validation.

During data validation, the Restart attribute identifies a "start over" point when an unidentified foreign object (UFO) is encountered in the data. All unrecognized data is considered an error of the type with the Restart attribute assigned.

If you are mapping data of a component with a Restart attribute in place, only the valid occurrences of that component are mapped. For example, suppose your input is a file of records, and the Record component of File has the Restart attribute. Suppose some of the records are invalid. When you map the Record objects, only the valid records are mapped. To map the invalid records (for example, to an error file) use an error-handling function, such as REJECT, in the map rule.

For information about error-handling functions, see the Functions and Expressions documentation.

Typically, you would assign the Restart attribute to a component that has a series range. For example, (1:20) or (s), and the objects in the series are independent of one another. If each record in your file is independent from the others, it makes sense to ignore an error if it encounters an invalid one. A bad record does not make the next record meaningless. But suppose the records are related. Maybe they are records related to one purchase order; if any record is bad, you want to stop after validation because it is important to have all records. Losing any records would make the overall data incomplete.

For additional information about using the Restart attribute, see the Map Designer documentation.

Tip: To capture all errors of the component using Restart, place the Restart attribute at the highest level possible in the schema.