On 10/11/07, Alan Ackerman <[EMAIL PROTECTED]> wrote: > My limited testing with the 'juxtapose' seemed to work, but I see it > does delay the record in more complicated testing, so I replaced it > with 'predselect'.
Both juxtapose and predselect have the mechanism that they hold the input record and look at what happens on their secondary input stream. In the pipelines we do here, the record on the secondary input is derived from the same stream as the primary. This means we can determine which record is held for the primary input when a record appears on the secondary. That's why that selection should not delay the record. The relevant difference between juxtapose and predselect is what they do when more than one record hits the secondary while holding one in the primary input. Juxtapose will get you a copy of the primary for each record on the secondary. But predselect gives only one copy, either to the primary output or secondary output. > I'm not at all sure how 'lookup' can help here -- lookup looks for > equality, not "contains as a word". So the trick you use is that the selection will break up the original record into words (based on the xlate that you do to blank the separators) and then you feed all words through lookup. As long as one of the words passes through your filter and hits the secondary input, the record is output by predselect \ *: | o: fanout | p: predselect | *: \ o: | xlate ... | split | l: lookup detail | p: \ o: | p: \ var list_of_words | split | l:
