Standardize multiple date columns

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
D0n1117
Premium Member
Premium Member
Posts: 11
Joined: Sun Dec 19, 2010 1:49 pm
Location: VA

Standardize multiple date columns

Post by D0n1117 »

I am trying to standardize multiple date columns (and other multiple columns) from custom rules sets. When I try to add 5 vDate standizations (one for each date), I get an error that says "Cannot add the same process twice". When adding all the dates into the vDate rule set, i only get one set of standardization outputs.

Is there a way I can apply a rule set to multiple columns (meaning to check each column) without adding five standization components in my case back to back?
Don
DataStage Developer
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

Each rule set can only be used once in a STN stage. This is because the output column is formed based on the rule set name. If you were able to use the same rule set more than once, you would get the duplicate column names, and that is not allowed in DataStage/QualityStage.

You can copy VDATE four times (VDATE2, VDATE3, etc), and then use those rule sets in one STN job.

You can also copy and modify VDATE to accept five date columns, but what would require Pattern Action Language knowledge. You might be better off with the first option :D
Regards,
Robert
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

Each rule set can only be used once in a STN stage. This is because the output column is formed based on the rule set name. If you were able to use the same rule set more than once, you would get the duplicate column names, and that is not allowed in DataStage/QualityStage.

You can copy VDATE four times (VDATE2, VDATE3, etc), and then use those rule sets in one STN job.

You can also copy and modify VDATE to accept five date columns, but what would require Pattern Action Language knowledge. You might be better off with the first option :D
Regards,
Robert
D0n1117
Premium Member
Premium Member
Posts: 11
Joined: Sun Dec 19, 2010 1:49 pm
Location: VA

Post by D0n1117 »

rjdickson wrote:Each rule set can only be used once in a STN stage. This is because the output column is formed based on the rule set name. If you were able to use the same rule set more than once, you would get the duplicate column names, and that is not allowed in DataStage/QualityStage.

You can copy VDATE four times (VDATE2, VDATE3, etc), and then use those rule sets in one STN job.

You can also copy and modify VDATE to accept five date columns, but what would require Pattern Action Language knowledge. You might be better off with the first option :D
Yes, I was thinking about just duplicating the rule sets too. Only problem is then if you have to update it, then you have to update them all.

You'd think IBM could just append a number to the end of the name and use a loop to support this feature. Maybe the next release.

That is a good idea to modify vDate, but I'd still have to update however many dates I allowed if something changed. I had to modify vDate anyway, since it doesn't accept the CCYYMMDD date format as input even though it outputs only that format.

I think I'm going to go with copying the rule set. Thanks for the help.
Don
DataStage Developer
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

You can definitely do it that way, but it seems a little messy to maintain.

Why not just copy the PK and relevant date into 4 streams and full list of fields into the 5th, put the 5 STAN stages in parallel and use the PK to join it back up while renaming the output fields?
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

Yep, there are many ways to solve the problem, and one persons messy is another's clean :)

In this case, the change is to a rule set that is unlikely to change again (it's just dates :lol:) , so one change, 4 copies, one STN and you're done.

No 'right' answer, just many possible solutions :lol:
Regards,
Robert
Post Reply