Data Transformation Engine Type Designer Reference Guide

Chapter 12 - Error Detection and Recovery Error Recovery
Example 3: Suppose you have this data:
x
1
, y
1
, z
1
x
2
, a
x
3
, y
3
, z
3
x
4
, y
4
, z
4
x
5
, y
5
x
6
, y
6
, z
6
In this example, Record 2 has a bad Y and a missing Z. Record 5 is missing a
component.
Without a restart, or any clue as to the existence of Record 2, the system cannot
figure out what to do - it must stop validation. You would get the message One or
more inputs was invalid occurs and no Record is mapped to the output.
However, with a restart on Record, the system goes back to the beginning of the
bad data of Record 2, and shifts over byte-by-byte until it collects all the bad
bytes as one rejected Record.
x
1
, y
1
, z
1
x
2
, a
x
3
, y
3
, z
3
x
4
, y
4
, z
4
x
5
, y
5
x
6
, y
6
, z
6
After it finds the valid Record 3, the system continues and finds Records 3 and 4
to be valid. Record 5 is another UFO, so the byte-by-byte shift begins again until
the system finds Record 6 to be valid. Because there is a restart attribute
assigned, all the valid Records are mapped to the output.
x
1
, y
1
, z
1
x
2
, a
x
3
, y
3
, z
3
x
4
, y
4
, z
4
x
5
, y
5
x
6
, y
6
, z
6
Example 4
: Suppose X is an identifier of Record. This affects validation because,
when it is found, the identifier causes Record 2 to exist. Suppose you have the
data in Example 3. When the looking at Record 2, the X (which is the identifier)
is found to be valid, so it is determined that Record 2 exists. Y is then found to
Bad data and a
missing component
A missing component
Rejected data
Rejected data
Bad record,
start over
Bad record,
start over
Record exists, mark errors
Record exists, mark errors
Bad record,
continue
Bad record,
continue