When you configure a flat file Lookup transformation for sorted input, the condition columns must be grouped. If the condition columns are not grouped, the Lookup transformation returns incorrect results. For optimal caching performance, sort the condition columns.
For example, a Lookup transformation has the following condition:
OrderID = OrderID1
CustID = CustID1
In the following flat file lookup source, the keys are grouped, but not sorted. The Integration Service can cache the data, but performance may not be optimal.
OrderID
CustID
ItemNo.
ItemDesc
Comments
1001
CA502
F895S
Flashlight
Key data is grouped, but not sorted. CustID is out of order within OrderID.
1001
CA501
C530S
Compass
-
1001
CA501
T552T
Tent
-
1005
OK503
S104E
Safety Knife
Key data is grouped, but not sorted. OrderID is out of order.
1003
CA500
F304T
First Aid Kit
-
1003
TN601
R938M
Regulator System
-
The keys are not grouped in the following flat file lookup source. The Lookup transformation returns incorrect results.
OrderID
CustID
ItemNo.
ItemDesc
Comments
1001
CA501
T552T
Tent
-
1001
CA501
C530S
Compass
-
1005
OK503
S104E
Safety Knife
-
1003
TN601
R938M
Regulator System
-
1003
CA500
F304T
First Aid Kit
-
1001
CA502
F895S
Flashlight
Key data for CustID is not grouped.
If you choose sorted input for indirect files, the range of data must not overlap in the files.