looping through a flat file of records

How-to(s), solutions to common problems, pearls of wisdom

symo1962
Posts: 1
Joined: Thu Nov 17, 2016 10:12 am

looping through a flat file of records

Postby symo1962 » Thu Nov 17, 2016 10:17 am

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

Thanks

vazquezrosariop
Posts: 112
Joined: Mon Feb 29, 2016 5:33 pm

Re: looping through a flat file of records

Postby vazquezrosariop » Mon Nov 21, 2016 9:35 pm

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.

LoopingGraphExample.zip
(13.8 KiB) Downloaded 40 times
---
Pedro Vazquez Rosario
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com
How to speed up communication with CloverCARE support