Page 1 of 1

Help with the logic

Posted: Mon May 03, 2010 2:40 pm
by Hope
I have to convert source data by applying the abbreviation rules.

My Source Data is .

Source
2343 South Bay Street
1899 Ranch Building
345 North McArthur Road

target
2978 S Bay ST
1899 Ranch BLDG
345 North McArthur RD

Please help me with the logic

Posted: Mon May 03, 2010 4:00 pm
by Sreedhar
There are two says to do this.

1) Use Quality Stage and use Address Standardization.
2) Use a look up to substitute
South with S
Building with BLDG
Road with RD

Let me know if you need more information on the same.

I have recently implemented it with lookup stage in my project.

Posted: Mon May 03, 2010 4:17 pm
by chulett
You can find official standarization lists out on the Internet if you don't already have your hands on them, including this pdf from the USPS.

Posted: Mon May 03, 2010 4:44 pm
by ray.wurlod
You might investigate the Trans() function for your lookups against a hashed file. This allows you to specify fourth argument of "C" that returns the original code if the reference value is not found. It will save you coding a number of If..Then..Else constructs.

You will also, of course, have to parse your address into individual tokens. The Field() function is recommeded for this task.

Posted: Mon May 03, 2010 4:55 pm
by Hope
I did use the standardization stage and it worked.

Sreedhar,
Out of curiousity,could you please explain me how I can use a lookup stage?.
If I put the values
North,N
South,S
Suite,STE
in lookup file
how do I match part of the string ex: I have 2343 South Bay Street with the values in the lookup file.

Thanks
Hope

Posted: Mon May 03, 2010 9:09 pm
by ray.wurlod
QualityStage would do that parsing for you.

If you choose not to use QualityStage (maybe because you don't have it) then the parsing operation is something you have to do. I would recommend Field() functions into stage variables.

Posted: Mon May 03, 2010 9:10 pm
by ray.wurlod
Is this a server job (as posted) or a parallel job (as marked)?
:?

Posted: Thu May 06, 2010 11:16 am
by Hope
This is a parllel job

Posted: Thu May 06, 2010 4:38 pm
by ray.wurlod
Then ignore my suggestion about Trans() function.

Moderator: please move to Enterprise Edition (parallel) forum

Posted: Thu May 06, 2010 8:36 pm
by DSShishya
@Sreedhar

Can you please explain how did you implement this using lookup stage?