How to reject junk or unknown values

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sathyak098
Participant
Posts: 23
Joined: Tue May 14, 2013 6:34 am

How to reject junk or unknown values

Post by sathyak098 »

Hello,
I have staging table of around 70 columns with the datatype CHAR.
I'm not doing any validation and transformation before load to staging.
So I can expect junk or unknown or unwanted values in almost all the columns.
for eg., Date or integer field may contain alphanumeric values.Varchar field may contain junk values. Because these fields are declared as CHAR in staging.
My requirment is to reject those kind of records before I load from staging to base table. Because Base tables are datatype specific.

May I get your help to achieve this?
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Look at the IsValid function to validate the content against a specified datatype ahead of your load. It's a "type conversion" function class.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is no "junk". Every character is part of the data you are being paid to process. The specifications you get from the data owner will tell you how to handle specific characters, even if you have to negotiate those specifications with the data owner. And that specification governs precisely what you must do. Anything not in the specification you do not do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ray put it clearly but I'll paraphrase:
"It's not 'junk' unless the customer tells you it is"
sathyak098
Participant
Posts: 23
Joined: Tue May 14, 2013 6:34 am

Post by sathyak098 »

I was to told to omit the record if it has other than alphanumeric and speacial characters.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do an exact search here for "double convert". You will need to know what "special characters" are allowable to perform this validation.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply