Bad Data ???

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Bad Data ???

Post by karthi_gana »

All,

I have a file which will be uploaded into a table.

say for example

Eno char 5
DOB datetime
Salary decimal 18,6

1
01/01/1970
12000

Incase if i have bad data like

2
M -- Should be datetime
A -- Should be decimal

I have to check the above and need to reject this row.

How?

Inputs are welcome!
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Server has several functions that could help with this, check out Num() (etc) or find Ray's free Server version of the PX IsValid() function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

chulett wrote:Server has several functions that could help with this, check out Num() (etc) or find Ray's free Server version of the PX IsValid() function. ...
i tried like

not(num(salary)) in the transofrmer...

but no use...

it is not rejecting the rows...
Karthik
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

In a parallel job , sequential file automatically rejects . Put a reject link and collect records which are having bad data .
Nag
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Maybe you need to say what you have tried including stage, variables, constraints and sample data.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

nagarjuna wrote:In a parallel job , sequential file automatically rejects . Put a reject link and collect records which are having bad data .
How is that going to help someone with a Server job? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

karthi_gana wrote: i tried like

not(num(salary)) in the transofrmer...

but no use...

it is not rejecting the rows...
Show us the precise constraint expressions you are using.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply