Page 1 of 1

Conditional feeder - how to force reevaluation

Posted: Fri Jul 03, 2015 9:23 am
by karkea
I would like to get your views on the following situation/challenge:
- a cost centre dimension
- cubes A and B which contain this cost centre dimension
- cube A feeds B with conditional feeder based on whether cost centre has status = Active (this information is in Cost Centre Info cube)
- processing these feeders takes more than the user would want to wait (let's say like +15 minutes)
- server is restarted every night so feeders get reevaluated latest by the next night
- in real life the cubes are more complex and therefore processing the feeders actually takes more than 15 minutes

So the feeder in Cube A would be:
['Value'] => DB(IF(DB('Cost Centre Info',!Cost Centre,'Status') @= 'Active', 'Cube B', ''), !Cost Centre, 'Value');

How would you handle a situation where a user changes status of a single cost centre from Inactive into Active during the day and would therefore of course expect to see numbers in Cube B?

I guess one would normally use TI process with CubeProcessFeeders to force reevaluation of the feeders, but in this case it is a bit tricky because it takes too long.

The only viable option I've come up with so far is to set up some kind of temporary cube that would feed Cube B. The temporary cube would only contain data for this changed cost centre and the temporary cube would be populated by TI process after the status has been changed from Inactive to Active. This data and temporary source for feeding would not be needed after the nightly restart of course. Another option might be to feed from the Cost Centre Info cube from the status element, but that would end up in overfeeding. What do you think?

Re: Conditional feeder - how to force reevaluation

Posted: Fri Jul 03, 2015 10:34 am
by mvaspal
Hi

My opinion is it depends on the query performance of the cube and the ratio between inactive and active stores. If this is a relatively small cube and/or the ratio of active stores are high, I would definitely overfeed.
The only viable option I've come up with so far is to set up some kind of temporary cube that would feed Cube B. The temporary cube would only contain data for this changed cost centre and the temporary cube would be populated by TI process after the status has been changed from Inactive to Active.
This could work but you cannot get rid of the original feeder if you load only changed CCs to the temp cube. So Just keep the temp cube small so that it contains data only for the one or few changed CCs.

Just a comment: feeders will be recalculated during the night only if you have PersistentFeeders=F in the cfg file.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 10:48 am
by TrevorGoss
Another comment to make incase your TM1 setup uses the .cfg parameter : MaximumCubeLoadThreads

The documentation for this parameter http://www-01.ibm.com/support/knowledge ... hreads_tm1
Tells us to set the MaximumCubeLoadThreads to 0 if your model uses conditional feeders.

As for your original post, I agree with mvaspal, I would also overfeed, especially if the downtime is lower than the forcing of a revaluation of feeders.

Do you use the parameter ForceReevaluationOfFeedersForFedCellsOnDataChange? This would have an impact on your issue, it relates to conditional feeders because it use to be called "ReevaluateConditionalFeeders".

Trevor.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 2:12 pm
by EP_explorer
TrevorGoss wrote:
Do you use the parameter ForceReevaluationOfFeedersForFedCellsOnDataChange? This would have an impact on your issue, it relates to conditional feeders because it use to be called "ReevaluateConditionalFeeders".

Trevor.
I don't think so. This parameter doesn't work.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 3:15 pm
by TrevorGoss
I don't think so. This parameter doesn't work
Really? I have never used the function as we do well without it, but have you tested it and it fails? What excatly do you mean by does not work? Does it just do nothing, or does it damage things? Is this a documented issue within IBM?

Thanks.

Trevor.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 3:22 pm
by EP_explorer
in other times it has another name but it didn't work anyway (in tasks with conditional feeders I mean, like in example in topic - may be it works in other cases - I don't know)

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 3:29 pm
by TrevorGoss
in other times it has another name but it didn't work anyway (in tasks with conditional feeders I mean, like in example in topic - may be it works in other cases - I don't know)
By the other name do you mean "ReevaluateConditionalFeeders"? Because that is what the documentation for this parameter says.

The documentation also states "When this parameter is set, a feeder statement is forced to be re-evaluated when data changes." When you say "its not working" do you mean that the documentation statement I have provided is false?

Thanks.

Trevor.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 3:53 pm
by gtonkin
I thought this may be down to the change in a *string* not being evaluated in the feeder so decided to try and replicate your issue.
I build two dimensions z_CC and z_Measures.
z_CC has a Parent called Total with C1-C15 as children.
z_Measures has Value (simple), Status (string)
z_A and z_B cubes were created with the two dimensions i.e. exactly the same cube structures.

z_B has the following rule:

Code: Select all

SKIPCHECK;

['Value']=N:DB('z_A',!z_CC,!z_Measures)*3;

FEEDERS;
z_A has the following rule:

Code: Select all

SKIPCHECK;

FEEDERS;
['Value']=>DB(IF(DB('z_A',!z_CC,'Status')@='Active','z_B',''),!z_CC,'Value');
Test 1
I opened up a view for z_A and added a value to C1 and set the Status to Active. cube z_B showed no values when suppressed but values when unsuppressed - seems like I could replicate your issue.
Trace feeders however did indeed show that the cell in z_B was fed.
I made a rule change on z_A, saved and checked z_B. Values showing, manual retrigger of feeders - no surprises here.

Test 2
Same as Test 1 to test my sanity but with element C2, same lack of results.
Trace feeders however did indeed show that the cell in z_B was fed.

Test 3
Added another simple measure called feeder and changed the feeder line as follows:

Code: Select all

['Value']=>DB(IF(DB('z_A',!z_CC,'Feeder')=1,'z_B',''),!z_CC,'Value');
Input a value against C3 and changed the Feeder to 1
No feeder fired! Trace feeders however did indeed show that the cell in z_B was fed.
Confirmed ForceReevaluationOfFeedersForFedCellsOnDataChange=T - it was
Ran a

Code: Select all

CubeProcessFeeders(z_A);
and got the expected results in z_B

Test 4
Eventually changed the feeder in z_A as follows:

Code: Select all

['Status']=>DB(IF(DB('z_A',!z_CC,'Status')@='Active','z_B',''),!z_CC,'Value');
Updated C4 with a value and set status to Active
z_B showed an update value!!!!

Test 5
Updated the feeder to:

Code: Select all

['Feeder']=>DB(IF(DB('z_A',!z_CC,'Status')@='Active','z_B',''),!z_CC,'Value');
Updated C5 with a value and set status to Active and set Feeder=1
z_B showed an update value!!!!

Test 6
Added another new simple measure called Sanity
Updated the feeder to:

Code: Select all

['Sanity']=>DB(IF(DB('z_A',!z_CC,'Status')@='Active','z_B',''),!z_CC,'Value');
Updated C6 with a value and set status to Active and set Sanity=1
z_B showed an update value!!!!

Preliminary conclusion (will have to be verified by someone else to confirm my sanity)
As crazy as this sounds, feeding from my element called Value just does not seem to work.

As this was a lot of to and fro, I would appreciate if someone could confirm the above and in so doing possibly assist KARKEA and others in the future - should the whole of the above turn out to be down to something in 10.2.2 FP3 IF then I will need to log with IBM.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 3:59 pm
by gtonkin
@KARKEA - please could you add another element called something other than Value e.g. Feeder, change the feeder line and dependent rules then test again to see if there is anything to my previous post.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 4:48 pm
by tomok
gtonkin wrote:I thought this may be down to the change in a *string* not being evaluated in the feeder
Since you are attempting to feed from a string value where is your FEEDSTRINGS statement in the rules????

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 5:34 pm
by declanr
The issue is that the cell which is being fed from is not the thing that is changing.

E.g. "A" can either feed "B" or "C" depending on the string in "Z"
The ForceReevaluationOfFedCellsOnDataChange parameter works perfectly when it is the value you are feeding FROM ("A") that changes... it will not reevaluate when "Z" changes.

Whether a cost centre is "Active" or not sounds more like a semi-admin task rather than a generic data input. Perhaps set up the ability to change that on a screen where you have an action button and the users can only actually make changes to the relevant field by hitting the action button that copies the values from an "Input" measure to the "Active" measure and then performs a CubeProcessFeeders function.


P.S sorry for typos or misunderstanding this has been typed out on my phone.

Re: Conditional feeder - how to force reevaluation

Posted: Wed Jul 08, 2015 5:59 pm
by EP_explorer
TrevorGoss wrote:
in other times it has another name but it didn't work anyway (in tasks with conditional feeders I mean, like in example in topic - may be it works in other cases - I don't know)
The documentation also states "When this parameter is set, a feeder statement is forced to be re-evaluated when data changes." When you say "its not working" do you mean that the documentation statement I have provided is false?

Thanks.

Trevor.
Try to use it and you see - it doesn't work. What is be more simple than it;-)

Re: Conditional feeder - how to force reevaluation

Posted: Thu Jul 09, 2015 5:19 am
by gtonkin
tomok wrote:Since you are attempting to feed from a string value where is your FEEDSTRINGS statement in the rules????
@Tom-In this case the string is a dependent variable and not the one being derived so KARKEA would not need to use FEEDSTRINGS. AFAIK, you would only use it where you have derived strings.

declanr wrote:The issue is that the cell which is being fed from is not the thing that is changing.
Thanks Declan, this is the mistake I too was making in my test I had my measures as Value, Status etc. and was setting Status AFTER Value. After a night's sleep it all seems clearer! Silly mistake on my part.

What also threw my off was that further changes to Value i.e. from 10 to 100 for example do not trigger the feeder when the sequence of capture is incorrect i.e. you have a cell with a value then change the status to Active. Update the value to another value, no feeder gets fired. If however you delete the value by pressing delete then re-enter, the feeder does fire.

If KARKEA ensures that Status is updated first then Value, the feeder does seem to re-fire.

Re: Conditional feeder - how to force reevaluation

Posted: Thu Jul 09, 2015 7:32 am
by karkea
Thanks for the comments/tests.

Indeed this is a semi-admin stuff and will be maintained by key users, not end users. Therefore I have some better changes to work with TI processes, etc.

And as already pointed out the value itself is not changing at all, only the condition of the feeder.

I will still check how reloading the values will affect the feeders. Some of the values are based on multiple calculations (and thus on multiple feeders), so in real life it is not as simple case as presented in here.

Re: Conditional feeder - how to force reevaluation

Posted: Thu Jul 09, 2015 10:42 am
by TrevorGoss
EP_explorer wrote:
TrevorGoss wrote:
in other times it has another name but it didn't work anyway (in tasks with conditional feeders I mean, like in example in topic - may be it works in other cases - I don't know)
The documentation also states "When this parameter is set, a feeder statement is forced to be re-evaluated when data changes." When you say "its not working" do you mean that the documentation statement I have provided is false?

Thanks.

Trevor.
Try to use it and you see - it doesn't work. What is be more simple than it;-)
declanr wrote:The ForceReevaluationOfFedCellsOnDataChange parameter works perfectly when it is the value you are feeding FROM ("A") that changes... it will not reevaluate when "Z" changes.
Declans comment there tells me that it works, it would make a big difference to the problem of the original post if this parameter did not work.

Re: Conditional feeder - how to force reevaluation

Posted: Tue Sep 20, 2016 11:51 am
by sumitgoyal2290
gtonkin wrote:
tomok wrote:Since you are attempting to feed from a string value where is your FEEDSTRINGS statement in the rules????
@Tom-In this case the string is a dependent variable and not the one being derived so KARKEA would not need to use FEEDSTRINGS. AFAIK, you would only use it where you have derived strings.

declanr wrote:The issue is that the cell which is being fed from is not the thing that is changing.
Thanks Declan, this is the mistake I too was making in my test I had my measures as Value, Status etc. and was setting Status AFTER Value. After a night's sleep it all seems clearer! Silly mistake on my part.

What also threw my off was that further changes to Value i.e. from 10 to 100 for example do not trigger the feeder when the sequence of capture is incorrect i.e. you have a cell with a value then change the status to Active. Update the value to another value, no feeder gets fired. If however you delete the value by pressing delete then re-enter, the feeder does fire.

If KARKEA ensures that Status is updated first then Value, the feeder does seem to re-fire.
I want to add one observation here: As it is said above we have to delete the value first and then enter the data in order fire the feeder, but in real scenario we can't ask users to delete the data and then enter the data again from scratch. Instead we can use cubeprocessfeeder() for populating the value. But again the question is what is the benefit of using force reevaluation parameter in cfg file.

Re: Conditional feeder - how to force reevaluation

Posted: Mon Jul 16, 2018 1:12 pm
by iansdigby
Regarding the parameter 'ForceReevaluationofFeedersForFedCellsOnDataChange',
besides it being an extraordinary mouthful, I believe there may be a misconception about how it is supposed to work.

The clue is in the '...ForFedCells...' bit. The parameter only forces re-evaluation of *ongoing* feeders from a cell that is already fed, the idea being that the presence of a feeder in a cell that goes on to feed others based on some condition, will not stop doing the ongoing bit if it is already fed (which would be the normal behaviour without the parameter).

I have tested and can confirm that, in the scenario where a *non-fed* cell is on the left-hand-side of a conditional feeder rule, and the condition changes to imply that a feeder should now be generated, the mouthful parameter does not make it happen.

Whether it actually works in the sense I believe it is meant to, I haven't tested;
a) because it takes a lot of setting up, and
b) because I cannot imagine the business scenario where such a thing should be needed. Can anyone else?