Parallel Transformer execution order
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 187
- Joined: Thu Apr 14, 2011 5:10 pm
Parallel Transformer execution order
I know this question is asked many many times , i see 2 answers 1. SV, Constraints, Derivations 2. Constraints , SV, Derivations. I tried for this in IBM documentation and couldn't find it anywhere.
I personally feel its SV, Const and Derivations for the reason why process all the SV's for all input records if the constraint drops a lot of records.
Please throw some light on this.
I personally feel its SV, Const and Derivations for the reason why process all the SV's for all input records if the constraint drops a lot of records.
Please throw some light on this.
-
- Premium Member
- Posts: 187
- Joined: Thu Apr 14, 2011 5:10 pm
ArndW, Thanks for the reply , This answer looks simple but is also why i debate with myself.
Considering the Stage variables can be used inside constraints , shouldn't the execution order be dynamic? first Check if a SV is used inside a constraint if yes then process SV before Constraints. And if not first process Constraints then SV. isn't it the better solution ?
Considering the Stage variables can be used inside constraints , shouldn't the execution order be dynamic? first Check if a SV is used inside a constraint if yes then process SV before Constraints. And if not first process Constraints then SV. isn't it the better solution ?
Going that route might save some processing cycles in jobs where a large majority of the rows are filtered by a constraint; but it would add complexity to the process of compiling transform stages plus it introduces potential confusion.
The Server transform stage would also need to be changed...
Thus I think that while an enhancement request might have merit, it won't be acted on by engineering because the potential gain [speed in certain cases] is outweighed by the risks [of breaking something].
The Server transform stage would also need to be changed...
Thus I think that while an enhancement request might have merit, it won't be acted on by engineering because the potential gain [speed in certain cases] is outweighed by the risks [of breaking something].
As previous poster has said, order of evaluation is SV, Constraints, Derivations
Generated code from transformer stage in folder RT_SCn of project directory (where n is JobNo). You can see that order of evaluation over there.
See snippet below:
Generated code from transformer stage in folder RT_SCn of project directory (where n is JobNo). You can see that order of evaluation over there.
See snippet below:
Code: Select all
mainloop {
// declare our intermediate variables for this section
dfloat InterVar0_0;
dfloat InterVar0_1;
// evaluate the stage variables first
StageVar0_StageVar = in_dat.PART_NUM;
// initialise the rejected row variable
RowRejected0 = 1;
// evaluate constraint and columns for link: out_dat
if ((in_dat.COST_PRICE > in_dat.SALE_PRICE))
{
if ((in_dat.SALE_PRICE >= in_dat.COST_PRICE)) {
InterVar0_0 = 0.0;
} else {
InterVar0_1 = in_dat.SALE_PRICE;
InterVar0_0 = InterVar0_1;
}
if ((InterVar0_0 > 0)) {
out_dat.CLEARENCE_IND_Corrected = InterVar0_2;
} else {
out_dat.CLEARENCE_IND_Corrected = InterVar0_3;
}
//;
writerecord 0;
RowRejected0 = 0;
}
}
Also, you can see from the posted code that when a constraint evaluates to FALSE, the derivations in the link are not... derived.
Wanted to add that I'm not sure I'd want to see anything about the order it evaluates things be made 'dynamic'. For whatever that is worth.
Wanted to add that I'm not sure I'd want to see anything about the order it evaluates things be made 'dynamic'. For whatever that is worth.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 187
- Joined: Thu Apr 14, 2011 5:10 pm
It is well documented, but a bit buried. I did not find it by searching "execution order" but by searching "stage variable" or "evaluation sequence."
Here is a link.
Here is a link.
Choose a job you love, and you will never have to work a day in your life. - Confucius
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: