Page 1 of 2

Feeders for Strings in Consolidated Levels

Posted: Tue Aug 16, 2011 8:57 am
by mce
Hi,
I need to feed string data from one cube to the other. Both source and target are string measures and source and target cells in both cubes are consolidated levels.
How should I use feeders in this case? My feeders did not work as I expected.

Regards

Re: Feeders for Strings in Consolidated Levels

Posted: Tue Aug 16, 2011 2:03 pm
by jstrygner
mce, you did not mention, so I want to make sure if you used FEEDSTRINGS command.

Re: Feeders for Strings in Consolidated Levels

Posted: Tue Aug 16, 2011 2:21 pm
by John Hammond
********* THIS IS FALSE ******************

You don't need to feed consolidations when they are calculated whether they are Numeric or String consolidations.

********* THIS IS FALSE ******************

I stated the above in my ignorance and have corrected this to prevent future readers getting the wrong information.


THIS BIT IS STILL TRUE

N level strings need to be fed.

Strings are fed in the normal way under FEEDERS; However this requires a FEEDSTRINGS ; declaration prior to SKIPCHECK otherwise the feeders are parsed without error but not implemented.

Re: Feeders for Strings in Consolidated Levels

Posted: Tue Aug 16, 2011 2:31 pm
by jstrygner
John Hammond wrote:You don't need to feed consolidations when they are calculated whether they are Numeric or String consolidations.
Strings for the calculation purpose, no, but e.g. for the "appear in a zero suppressed view" purpose you need to feed strings and I thought this is the case.

Re: Feeders for Strings in Consolidated Levels

Posted: Thu Aug 18, 2011 8:05 am
by mce
jstrygner wrote:mce, you did not mention, so I want to make sure if you used FEEDSTRINGS command.
I used FEEDSTRINGS command and I also put feeders.
My calculation works when zero suppression is not enabled. When I zero suppress, rule calculated string values are not displayed. Therefore I thought there is an issue with feeders.

Re: Feeders for Strings in Consolidated Levels

Posted: Thu Aug 18, 2011 10:55 am
by John Hammond
mce

Please could you post your code so we can take a look.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 12:42 am
by mce

Code: Select all

# rule in my target cube
FEEDSTRINGS;
SKIPCHECK;
['dim4':'conselementindim4']=S:DB('mysourcecube',!dim1,!dim2,!dim3);

Code: Select all

#rule in my source cube
#dim3 has only string elements.
FEEDSTRINGS;
SKIPCHECK;
FEEDERS;
[]=>DB('mytargetcube','conselementindim4',!dim1,!dim2,!dim3);
my string data is in consolidation elements in dim1 and dim2.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 1:40 am
by mce
actually it works now. maybe I did not test it properly initially.
still any comments will be appreciated.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 2:37 am
by mce
however it works very slow due to the overfeeding. it feeds all children in dim4 to display the string in one consolidation item in dim4. I cannot use it this way. it looks feeding strings in consolidation levels is very inefficient in TM1.

I would appreciate any suggestions.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 7:28 am
by qml
The obvious suggestion is to feed just one child of that consolidation instead of them all. Use ELCOMP('dim4', 'conselementindim4', 1) to achieve that.
Secondly, limit the feeding range, right now your whole cube is feeding and with a lot of data it can take a while.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 8:06 am
by mce
qml wrote:The obvious suggestion is to feed just one child of that consolidation instead of them all.
Already tried this but does not make the rule work consolidated element when zero suppressed.
qml wrote:Secondly, limit the feeding range, right now your whole cube is feeding and with a lot of data it can take a while.
actually I have many more dimensions in the target cube similar to dim4 and I need string data to appear oly in top consolidated items in those. actually it is a small range if you only consider this top slice, but since it has to feed all children to make rule work for the top consol element, it turns out to be feeding too many cells.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 9:06 am
by qml
mce wrote:
qml wrote:The obvious suggestion is to feed just one child of that consolidation instead of them all.
Already tried this but does not make the rule work consolidated element when zero suppressed.
This is unexpected. It should be enough for one child of a consolidation to be fed in order to see the consolidation in a zero-supressed view. There should be no need to feed all the children. I think I've had someone report to me a similar problem with version 9.5.1 (no fixpacks) and I would actually start considering this to be a bug.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 9:31 am
by mce
qml wrote:This is unexpected. It should be enough for one child of a consolidation to be fed in order to see the consolidation in a zero-supressed view. There should be no need to feed all the children. I think I've had someone report to me a similar problem with version 9.5.1 (no fixpacks) and I would actually start considering this to be a bug.
This works for numeric measures in 9.5.1. Are you sure that it is supposed to work also for string measures? Has it been working in any other version before?

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 10:30 am
by qml
I know we're talking about strings here. I THINK it has worked in other versions, but of course it would be nice if someone could confirm that (or prove me wrong).

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 12:51 pm
by jstrygner
Hi, just checked what qml suggested on two environments: 9.5.1 HF17 and 9.4.1 FP3 (don't know which HF). In both cases feeding the string cell on leaf level does not make the string on consolidation level visible when zeroes suppressed :(.

There is a method to achieve what you need without feeding all the string-children, but I think it is definitely not worth implementing. I put it only as a brainstorm teaser :).

You can turn off rules for this string, put manually a value in the consolidation-string cell and then reapply the rule.
This way cell will get this "non-empty" flag and will be visible when you suppress zeroes and will be calculated properly on-the-fly.
But it will be there only till you unload cube/restart server, because as we know now TM1 lost its old functionality of storing manually inputted data under rule calculated cells (I also checked it for my both environments listed above and even in my 9.4.1 it also makes values turn to blank after applying a rule and then removing it, checked both numeric and string cells).

So as I said before, this is something you probably will not want to use, but maybe following this path somebody else will get some useful ideas.

Other option is of course to fill the cell via TI, but I am sure you already considered it.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 4:05 pm
by mce
jstrygner wrote:You can turn off rules for this string, put manually a value in the consolidation-string cell and then reapply the rule.
This way cell will get this "non-empty" flag and will be visible when you suppress zeroes and will be calculated properly on-the-fly.
I already observed that this works. But I am trying to avoid storing string measures in big target cube, and always display them via rule from another smaller cube. When I do the above, I will have to store some text in the target cube anyway. Thanks anyway for the suggestion.

It looks the only option remains to be is to get rid of the small source cube and directly load string data into the big target cube. This is a shame for TM1 not being able to do lookups efficiently on string data for consolidated level cells.

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 4:11 pm
by rozef
Have you try to use ConsolidateChildren function instead of feeder?
(Dont know if it works)

Re: Feeders for Strings in Consolidated Levels

Posted: Fri Aug 19, 2011 6:39 pm
by lotsaram
rozef wrote:Have you try to use ConsolidateChildren function instead of feeder?
(Dont know if it works)
Not to put too fine a point on it but that is a ridiculous suggestion. Have you ever even used this function or even looked at the documentation for ConsolidateChildren?

Re: Feeders for Strings in Consolidated Levels

Posted: Mon Aug 22, 2011 9:30 am
by rozef
lotsaram wrote:
rozef wrote:Have you try to use ConsolidateChildren function instead of feeder?
(Dont know if it works)
Not to put too fine a point on it but that is a ridiculous suggestion. Have you ever even used this function or even looked at the documentation for ConsolidateChildren?
Yes I already used it and I dont see why you are saying thats a ridiculous suggestion.
This function allow to consolidate only targeted elements which is exactly what mce want to do (sorry if I am wrong).
I dont know if it works on Strings (I dont see why it shouldn't).
It is lighter then use classical feeder and you can feed all the elements of a dimension by targeting one top consolidate element (if its sons are calculated).
You can choose several axis too, tough it is not precised in IBM exemples.
The only problems of this function is that you have to feed with it all the long of the chain of rules that you have started with,
and to feed all elements you have to use it on all different hierarchy levels in one dimension.

If you have more question on it, I will be glad to answer you.

Regards.

Re: Feeders for Strings in Consolidated Levels

Posted: Mon Aug 22, 2011 2:15 pm
by tomok
rozef wrote:Yes I already used it and I dont see why you are saying thats a ridiculous suggestion.
It's a ridiculous suggestion because ConsolidateChldren has nothing whatsoever to do with string values and feeding cells with string values. Using the ConsolidateChildren function will not feed anything. You still have to write feeders when you use that function so how is that going to help with the original problem? The issue here is that for string purposes, there is no such thing as a consolidaton. Any cell that is configured to hold string values is automatically treated as a leaf element. The problem the original poster is having is with how to get a consolidated cell, that is holding string values, fed. Using ConsolidateChildren to define the consolidation point is not going to do anything to help with that. What the OP needs to do is use the FEEDSTRINGS statement in the rule and then be sure to feed the cell that holds the string, even though it is a consolidated node in the hierarchy. As long as you write the feeder to be limited to only the element in measure dimenion that is specificed as "S" type, it should work.