on 12-05-2009 8:56 AM
Hello Experts
I am using a UDF to create context change and another UDF to supress context changes , But strangely for one particular set of data my target node ignores a context change and jumps to the other context , Messing the whole cardinality.
Have ever faced a sistuation where a context is being ignored from queue? I can see 4 context changes and 4 values in the queue . but only 3 are being used. It ignores the 3rd value and jumps to the 4th value and places it in the 3rd target node leaving 4th node blank.
The udf i used is String[] a
String toCompare = a[0];
int sameValCounter = 0;
for (int i = 0; i < a.length; i++)
{
if (a<i>.equals(toCompare)) {
result.addValue(a<i>);
sameValCounter++;
}
else {
for (int z = 0; z < sameValCounter; z++) {
result.addContextChange();
}
result.addValue(a<i>);
toCompare = a<i>;
sameValCounter = 1;
}
}
Anybody has a solution for this ?
Edited by: sudheer kamepalli on Dec 5, 2009 9:56 AM
Hi Sudheer,
If you give the example then we are very clear.
If you want to suppress the context then use result.addSuppress();
If you want to add the context then use result.addValue(ResultList.CC)
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Provide an example value set for ur requirement. That can help understand ur code & tell what might be wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.