constraint to " OTHERWISE" for a otherwise link in

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

cetzhbo
Premium Member
Premium Member
Posts: 38
Joined: Tue Aug 28, 2007 10:20 am

constraint to " OTHERWISE" for a otherwise link in

Post by cetzhbo »

Hello Gurus,

I can set constraint to " OTHERWISE" for a otherwise link in transformer stage . what does that constraint mean?

thanks very much!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Catch all. It 'fires' only if none of the other triggers fire.
-craig

"You can never have too many knives" -- Logan Nine Fingers
cetzhbo
Premium Member
Premium Member
Posts: 38
Joined: Tue Aug 28, 2007 10:20 am

Post by cetzhbo »

thanks, but if I don't set this constraint for otherwise link, I think it also catch all the rows when there is not other constraint fired. is that right ? if that is it, why should we need use this setting?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No, only rows that don't go down any other links will go down an "Otherwise".
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry, but for some silly reason I thought you meant an 'Otherwise' trigger in a Sequence job and were using the word 'constraint' in a more generic manner. Let's start over. :?

There is no such thing as an 'OTHERWISE' constraint. An empty constraint means the link is not constrained and accepts all rows - unless it is marked as a Reject link. A constraint expression allows records to pass down the link only when it evaluates to 'true'. Reject links are the only ones that behave in an 'otherwise' fashion and that based only on the links before it in the link order.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ArndW wrote:No, only rows that don't go down any other links will go down an "Otherwise".
Is this something new in 8.x or PX? An 'otherwise' constraint? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
cetzhbo
Premium Member
Premium Member
Posts: 38
Joined: Tue Aug 28, 2007 10:20 am

Post by cetzhbo »

Hi chulett,

that is true, please read following words from v8: ( this is definitly not "Otherwise/Log field" )

A constraint otherwise link can be defined by:

Set the constraint to OTHERWISE. This will be set whenever a row is rejected on a link because the row fails to match a constraint. OTHERWISE is cleared by any output link that accepts the row.

thanks very much!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Nothing new, in server transform stages it was labelled "reject" link.

And it functions just as Craig and I have stated - if a row doesn't get output to any other link(s) then it goes to the otherwise link.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Great, thanks for the clarification. Does it still function as the Server 'reject' does where it is positional, meaning it fires if the links above it haven't? Or is it a true 'otherwise' constraint?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I haven't checked at V8 or in PX. Could be a "gotcha"
cetzhbo
Premium Member
Premium Member
Posts: 38
Joined: Tue Aug 28, 2007 10:20 am

Post by cetzhbo »

thanks friends,

but this otherwise link is not a reject link. and following is as abstract for v8 developer guide, hopeful you can make it clear:

A constraint otherwise link can be defined by: v Clicking on the Otherwise/Log field so a tick appears and leaving the Constraint fields blank. This will catch any rows that have failed to meet constraints on all the previous output links.

v Set the constraint to OTHERWISE. This will be set whenever a row is rejected on a link because the row fails to match a constraint. OTHERWISE is cleared by any output link that accepts the row.

v The otherwise link must occur after the output links in link order so it will catch rows that have failed to meet the constraints of all the output links. If it is not last rows may be sent down the otherwise link which satisfy a constraint on a later link and is sent down that link as well.

v Clicking on the Otherwise/Log field so a tick appears and defining a Constraint. This will result in the number of rows written
cetzhbo
Premium Member
Premium Member
Posts: 38
Joined: Tue Aug 28, 2007 10:20 am

Post by cetzhbo »

thanks friends,

but this otherwise link is not a reject link. and following is as abstract for v8 developer guide, hopeful you can make it clear:

A constraint otherwise link can be defined by: v Clicking on the Otherwise/Log field so a tick appears and leaving the Constraint fields blank. This will catch any rows that have failed to meet constraints on all the previous output links.

v Set the constraint to OTHERWISE. This will be set whenever a row is rejected on a link because the row fails to match a constraint. OTHERWISE is cleared by any output link that accepts the row.

v The otherwise link must occur after the output links in link order so it will catch rows that have failed to meet the constraints of all the output links. If it is not last rows may be sent down the otherwise link which satisfy a constraint on a later link and is sent down that link as well.

v Clicking on the Otherwise/Log field so a tick appears and defining a Constraint. This will result in the number of rows written
cetzhbo
Premium Member
Premium Member
Posts: 38
Joined: Tue Aug 28, 2007 10:20 am

Post by cetzhbo »

thanks friends,

but this otherwise link is not a reject link. and following is as abstract for v8 developer guide, hopeful you can make it clear:

A constraint otherwise link can be defined by: v Clicking on the Otherwise/Log field so a tick appears and leaving the Constraint fields blank. This will catch any rows that have failed to meet constraints on all the previous output links.

v Set the constraint to OTHERWISE. This will be set whenever a row is rejected on a link because the row fails to match a constraint. OTHERWISE is cleared by any output link that accepts the row.

v The otherwise link must occur after the output links in link order so it will catch rows that have failed to meet the constraints of all the output links. If it is not last rows may be sent down the otherwise link which satisfy a constraint on a later link and is sent down that link as well.

v Clicking on the Otherwise/Log field so a tick appears and defining a Constraint. This will result in the number of rows written
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you don't believe the response you've gotten it only takes about 2 minutes to write a dummy job with a row generator, a transform stage and several peek stages. Please disprove what has been said so far about using the OTHERWISE functionality.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In other words, with the exception of (apparently) being able to type the word 'OTHERWISE' in the constraint, it works exactly the same as a Server reject link. Positional, logging, the whole nine yeards.
-craig

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