Counter value in Grid Partition
Moderators: chulett, rschirm, roy
Counter value in Grid Partition
Hi All,
Iam Currently using Datastage 8.5 Version. I have created a counter stage variable in transformer (whichis set in sequential mode)
My requirment is I need to Process the records when the counter <=50
Only the 50 records for each Accounttype.
Counter: If CurrentAccounttype=PrevAcctype then counter+1 else 1.
I have checked the counter values, it is generated correctly for each accttype.
But the output link from transformer does not consider for the constraint.
even when i tried a filter stage it didnt work.
the grid details are computenodes(2,2) and partition 1. since it runs in 2nodes, not all the records <=50 goes down to the next links.
thanks in advance !
-dj
Iam Currently using Datastage 8.5 Version. I have created a counter stage variable in transformer (whichis set in sequential mode)
My requirment is I need to Process the records when the counter <=50
Only the 50 records for each Accounttype.
Counter: If CurrentAccounttype=PrevAcctype then counter+1 else 1.
I have checked the counter values, it is generated correctly for each accttype.
But the output link from transformer does not consider for the constraint.
even when i tried a filter stage it didnt work.
the grid details are computenodes(2,2) and partition 1. since it runs in 2nodes, not all the records <=50 goes down to the next links.
thanks in advance !
-dj
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The fact that it's on a grid is immaterial. Counters are computed per node. Constraint expressions are evaluated per node. So, with four nodes, counter <= 50 should generate approximately 200 rows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
You said the transformer performing the counting is running in sequential mode. That means it is active in only one logical node. Is the constraint in that transformer, or in a later transformer which runs in parallel mode (and hence in 2 logical nodes)? Seeing the constraint logic would be a helpful step.
What is the data type for your counter?
Regards,
What is the data type for your counter?
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
The output from the transformer for each account type should restrict for 50rows.
Input to transformer is SOrted on Accttype
stagevar details:
Currval: AcctType
Counter : If CurrVal=PreVal then Counter+1 Else 1
PreVal:Currval
Constraint: Counter<=50
Output From Transfomer;
peekstage:
AcctType Counter
A1 1
A1 2
A1 26
A1 50
B1 3
B1 50
The issue is the for each accttype not all 50rows are outputed from transformer.
How does the transformer process the rows ,does it runs in 2 nodes and skips the other valid rows from node 1 when node 2 counter reaches=50
Thanks,
dj
Input to transformer is SOrted on Accttype
stagevar details:
Currval: AcctType
Counter : If CurrVal=PreVal then Counter+1 Else 1
PreVal:Currval
Constraint: Counter<=50
Output From Transfomer;
peekstage:
AcctType Counter
A1 1
A1 2
A1 26
A1 50
B1 3
B1 50
The issue is the for each accttype not all 50rows are outputed from transformer.
How does the transformer process the rows ,does it runs in 2 nodes and skips the other valid rows from node 1 when node 2 counter reaches=50
Thanks,
dj
In the transformer i have set it as sequential for generating the counter.
In Peek , it is set by Default (Parallel).
when there are 60rows for accttype ,the peekstage doesn't capture all the 50rows.
AcctType Counter
A1 1
A1 2
A1 26
A1 50
B1 3
B1 50
The input is Hash partitioned and sort on AcctType.
**when i tried mentioning explicitly counter=1 or counter=2 or counter=3 in the constrinat, i was able to get the row3.
Please advice where the gap is..
Thanks,
dj
In Peek , it is set by Default (Parallel).
when there are 60rows for accttype ,the peekstage doesn't capture all the 50rows.
AcctType Counter
A1 1
A1 2
A1 26
A1 50
B1 3
B1 50
The input is Hash partitioned and sort on AcctType.
**when i tried mentioning explicitly counter=1 or counter=2 or counter=3 in the constrinat, i was able to get the row3.
Please advice where the gap is..
Thanks,
dj
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: