on 08-18-2015 6:00 PM
I am facing a strange situation in one of my mapping programs.
The graphical mapping looks like this:
When I do a display queue of the FIRST udf I can see the expected result
When I do a display queue in the next UDF which is taking the output of the FIRST UDF I can see some extra "null" values
In the subsequent UDF I see that all the output values are vanished and some "null" values are getting as an input to the target function
With this strange behaviour my mapping is failing and I am unable to understand how my output values are getting replaced with "null"
Any help will be appreciated
Sourabh
Can you try using CollapseContext and then splitbyvalue before the Handlecontext udf it will remove the null values but here we should focus on the reason why the null values are coming..in the DQ of second udf can you provide the code not all of it but the code associated with poppulating the ResultList variable. It has something to do with the Duplicate udf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinay
That was a valid point to try figuring out why the null values were coming so i went back in the mapping logic to find anything and the team noticed something
we have used ifS at many places instead of if
So we replaced all the ifS with if
And all the null values disappeared
When we looked into the difference between the two we found that the explanation is following:
when one of the branches of function 'if' contains a User-Defined function that produces side-effects. Like increments and stores a counter in 'GlobalContainer', for example. Such functions will be executed more times than before and will cause the numbering to go awry.
As replacing if with ifS has solved the issue I wonder that above scenarios was occuring in our case.
Thanks all for your help.
HI Sourabh,
Can you please cross check/share the code snippet of the Duplicate UDF to make sure this issue is not occurring because of the the code.
Also, what is the udf type of the handle context udf, is it context or queue?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sourabh,
Can you try adding mapWithDefault after all the ResultLists of the Duplicate UDF?
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.