Page 1 of 1

looping through a flat file of records

Posted: Thu Nov 17, 2016 10:17 am
by symo1962
Looking to check a piece of verbatim text for some text. The text is a set of bsb numbers in a flat file. I need to run through all the entries in this flat file to check if they are in the text. Any ideas

Also how do you control a loop through a file like this in CTL? If you can


Re: looping through a flat file of records

Posted: Mon Nov 21, 2016 9:35 pm
by vazquezrosariop
Hi symo1962,

From what I understand you want to compare a text file that contains bsb numbers to another flat file. I would recommend that you extract the bsb numbers from the text using a "find" functions in a Normalizer component(allow you to create one or more output records from each single input record). Then use a FlatFilereader or UniversalDataReader to extract the bsb number from the flat file. Afterwards, compare both streams using a DataIntersection component which will allow you to determine which bsb numbers are present in both the text and flat file, and which bsb numbers are in the text but not in the flat file.

I have taken the liberty of attaching a example project where this use case is implemented.
(13.8 KiB) Downloaded 214 times