Page 1 of 1

Creating multiple extractions from one filter

Posted: Sat Feb 20, 2010 11:29 am
by enh2000
I have data that i managed to filter as follows:

A 12345,John Smith,Los Angeles,CA
B 12345,Albertsons,Cashier
C 12345,Blue Cross,HMO
A 54321,Sam Knight,Cerritos,CA
B 54321,Acme Widgets,Security Guard
C 54321,Aetna,PPO
A 98765,Alexis Jackson,El Segundo,CA
B 98765,Farmer Boys,Cashier
C 98765,Kaiser,PPO

I'm trying to extract the comma delimited version of each file to it's own csv file and include header information on each.

Going to "client.csv":
account,name,city,state
12345,John Smith,Los Angeles,CA
54321,Sam Knight,Cerritos,CA
98765,Alexis Jackson,El Segundo,CA

Going to "employment.csv":
account,employer,position
12345,Albertsons,Cashier
54321,Acme Widgets,Security Guard
98765,Farmer Boys,Cashier

the last group going to "insurance.csv"

I was looking at T-Filter to accomplish this but cannot get those filters to run. I basically created a T-Filter after the initial formatting pass and on the first T-Filter I put Extract lines matching "A ", Remove column: Column 1..5, Insert lines at line 1 [<the header text>]

I can't get any of those filters running once i put it under T-Filter. What am i doing wrong?

TIA,
Eric

Re: Creating multiple extractions from one filter

Posted: Mon Feb 22, 2010 7:32 am
by DataMystic Support
Hi Eric,

The only point you are missing is that the T-Filter needs a Filters\Special\Secondary output filter to direct the output somewhere.

Re: Creating multiple extractions from one filter

Posted: Tue Feb 23, 2010 9:17 am
by enh2000
Thanks Simon. That worked! I did try it before with the secondary output, but I probably didn't have the right filters setup in the T-filter. You cannot check if the filter is working within the T-filter it seems.
But if you bring the filters just above the filter to test to make sure it's extracting right before putting it in the T-Filter then I was able to confirm what the output files were going to be.

Re: Creating multiple extractions from one filter

Posted: Tue Feb 23, 2010 10:01 am
by DataMystic Support
Hi Eric - you can easily test a T-filter by using a debug filter to see data flowing into it, or using a search/replace with prompting to match .*? so that you get prompted when data arrives in it.