Hi
I am using transformer in Parallel Extender job. Transformer with two output links (First and Second), to split the input data.
I want to write a constraint for First(Link name) link.
when values for perticular input column (Role_ID) has AAAAA then I need to populate PPPPP
If column (Role_ID) has BBBBB then I need to populate PPPPP
If column (Role_ID) has CCCCC then I need to populate PPPPP
If column (Role_ID) has DDDDD then I need to populate PPPPP
If column (Role_ID) has EEEEE then I need to populate PPPPP
And I need to direct all these records (Role_ID has AAAAA, BBBBB, CCCCC, DDDDD, EEEEE) to First (Link name) output link.
About Second output link of the transformer
I naeed direct all the records (every record of the input) to the Second output link of the transforme
And I am using the following condition on the First link constraint, but not working
IF Today.PO_ROLE_CD = "OWTR " then Today.PO_ROLE_CD = "PPPPP" else IF Today.PO_ROLE_CD = "TRST " then Today.PO_ROLE_CD = "PPPPP" else
IF Today.PO_ROLE_CD = "CUSN " then Today.PO_ROLE_CD = "PPPPP" else IF Today.PO_ROLE_CD = "BRKR " then Today.PO_ROLE_CD = "PPPPP"
I am looking for the solution
Thanks
Transformer constraint
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 38
- Joined: Sat Dec 29, 2007 9:58 am
Constraints are expressions that evaluate to True or False and which control whether the link 'fires' or not, i.e. if data is allowed down it or not. What you've posted are assignments, in other words expressions that belong in the derivation of specific output fields, not in a constraint.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 38
- Joined: Sat Dec 29, 2007 9:58 am
Can any one send me the soln
For my question can any one send the solution please
I'd clarified what you need to do and hoped you'd put some effort into figuring out the rest but if you are looking for something more 'silver platter', then fine...
The first link constraint should be something like:
For the second link to pass all records, simple leave the contraint empty. You'll still need to use what you posted as derivations.
The first link constraint should be something like:
Code: Select all
Today.Role_ID = "AAAAA" or Today.Role_ID = "BBBBB" or Today.Role_ID = "CCCCC" or Today.Role_ID = "DDDDD" or Today.Role_ID = "EEEEE"
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 134
- Joined: Tue Jun 15, 2010 2:10 am
- Location: Bangalore
you cannot populate a value in the constraint.you need to write the conditions in the derivation for a field in the output.If you want to restrict the records on the conditions then
For first o/p link contstraint :
column (Role_ID) ='AAAAA' OR column (Role_ID) ='BBBBB' OR column (Role_ID)='CCCCC' OR column (Role_ID)= 'DDDDD' OR column (Role_ID)='EEEEE'
Please clarify where you need to populate 'PPPPP'
For first o/p link contstraint :
column (Role_ID) ='AAAAA' OR column (Role_ID) ='BBBBB' OR column (Role_ID)='CCCCC' OR column (Role_ID)= 'DDDDD' OR column (Role_ID)='EEEEE'
Please clarify where you need to populate 'PPPPP'
N.Srinivas
India.
India.
You are very right and noted pretty much everything I did in my reply. However, the post is marked as 'Resolved', something I did after receiving a private message from the OP saying that everything now worked, so I don't think they'll be back to this thread. ![Wink :wink:](./images/smilies/icon_wink.gif)
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers