Constraint Syntax

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
srinath51
Participant
Posts: 61
Joined: Wed Aug 31, 2011 10:47 am
Location: United States

Constraint Syntax

Post by srinath51 »

Hi all,
i have a field Named - "Buss_unit(varchar(5))" which display the values as Null,12,20.

Now my requirement is that i have to define a constraint in the Transformer to Delete the rows with Null values...

Please help me the syntax.
Sri.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

The constraints use standard expression syntax as you would use in other transformer derivations. If the expression evaluates as true, the row in question will be sent to the output link.

IsNotNull(inputlink.Buss_unit)

If the column is not null, then the expression evaluates to true and the record passes through to the link.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
srinath51
Participant
Posts: 61
Joined: Wed Aug 31, 2011 10:47 am
Location: United States

Post by srinath51 »

Thanks Jwiles....
Sri.
macromathi1
Participant
Posts: 4
Joined: Tue Sep 18, 2007 3:40 pm
Location: Riyadh, Saudi Arabia

Post by macromathi1 »

i hope no function exist in the name IsNotNull(), use Not(IsNull(inputlink.Buss_unit))
Thanks,
Mathi Sang
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why the hope? IsNotNull() is a perfectly valid function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

i wonder why people are using

Code: Select all

Not(IsNull(inputlink.Buss_unit)) 
format. I have also seen in some sites, still people are not much aware of IsNotNull.
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Probably from people with a Server background as it only exists in the Parallel product. In any case, either way works just fine.
-craig

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