Originally posted by: mikeladd
Morning everyone.
I am trying to extract partner data from a file, but some of the records are duplicated.
Data looks like this:
F1 F2 F3 F4 F5
TEST1|ZZ|PB000030|0001149|004010X091A
test2|ZZ|PB000029|0004761|004010X091A1
test2|ZZ|PB000029|0001378|004010X091A1
test2|ZZ|PB000029|0055077|004010X091A1
test2|ZZ|PB000029|0055077|004010X091A1
test2|ZZ|PB000029|0049661|004010X091A1
test3|ZZ|AH000599|B754|004010X091A1
My unique ID's are the F3 & F4 fields. I can pass UNIQUE(F3) & File to an F_Map. But my problem is then getting JUST the unique rows based on the F4 ID's out of those results.
I need to build XML data that looks similar to this
<TP Info>
<F1></F1>
<F2></F2>
<F3></F3>
<AP INFO>
<F4></F4>
<F5></F5>
</AP INFO>
<AP INFO>
<F4></F4>
<F5></F5>
</AP INFO>
</TP INFO>
I need a TP INFO tag for every unique F3 field, and at least one AP INFO tags for every unique F4 field.
So I should have 3 TP INFO groups, but the second TP INFO should have 4 AP INFO groups, not 5
My problem seems to be the initial Extract based on the F3. I am unable to Extract the UNIQUE rows for that F3 ID. Regardless of how I modify the rule, I keep getting an AP INFO tag for every F4 in the input, regardless of the logic used in the F_Map call.
I can built it correctly using only one of the conditions, but not both.
Hmm, may not have been the clearest description. Please let me know if I can provide more info.
-Mike
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange