Page 1 of 1
Copy data feeder
Posted: Mon Jul 05, 2010 12:18 pm
by ParisHilton
Is it possible to create a rule and feeder that allows me to 'Copy' a value from one element to all other elements in a dimension eg.
In a cube with Dimensions
Dim1,Dim2,Dim3 and Measures
Where Measures has 2 elements 'Value' and 'BaseValue'
Dim_3 has a special 'LoadedValue'
Data is loaded to elements of Dim1,elements of Dim2 , 'LoadedValue','BaseValue'
skipcheck;
['Value']=['BaseValue','LoadedValue'];
feeders;
['BaseValue']=>['Value'];
My thinking is that wherever I have a number at the intersection of Dim1,Dim2, and LoadedValue, then Value will be populated with BaseValue for everyelement in Dim3
What I don't understand is that Value doesn't seem to be fed. Am I approaching this in the right way?
[ps I've tried to simplify the model as far as possible. What I am really trying to do is recreate TM1 security in an enviroment where I can't rely on the TM1 authentication, but my client can specify a username as one of the dimension elements).
Re: Copy data feeder
Posted: Mon Jul 05, 2010 2:20 pm
by jim wood
Should you be doing this via TI instead? It is after all a straight copy that you want to happen based on a manual trigger.
If you insist on doing it using rules you might want to use version rather than base value. (For example ver1, ver2, etc) Then create a simple string cube to control the version. Then you need to change the rule to a DB:
['Value']=DB('cube',dim1,dim2,DB('ref cube','dim1','text'),'LoadedValue');
Your feeder will need to be variable:
['LoadedValue'] => DB('cube',dim1,dim2,if(dim3@=DB('ref cube','dim1','text'),dim3,''),'Value');
If I remember rightly feeders are compiled at service startup. I'm 100% certain that the feeder will work when you amend the version without a service restart. I might be wrong, as I say I'm not 100% (Been a while),
Jim.
Re: Copy data feeder
Posted: Mon Jul 05, 2010 2:32 pm
by ParisHilton
Thanks for the swift reply.
I'll give it a whirl.
I did consider a TI process and there's no compelling reason to use rules over TI. I did think rules would be nicer to work with as it's easier to edit data and get instant gratification rather than run a dataload process
Thanks for the indepth reply, even if I go the TI route , I'll learn something feeders and rules from your reply !
ps - what do think of Roy Hodgson?
Re: Copy data feeder
Posted: Mon Jul 05, 2010 4:58 pm
by ParisHilton
I think it's my TM1 server having a bad hair day. It's now refusing to save even very simple rules using the DB(...) complaining about invalid strings and syntax, even though the rule is built entirely by clicking buttons.
Time for a reboot......
Re: Copy data feeder
Posted: Tue Jul 06, 2010 10:53 am
by jim wood
Roy Hodgson? A good appointment in my view. I think it's what Liverpool need. They won't be able to spend money, so they need somebody that can handle the players they have and get the best out of them.
Re: Copy data feeder
Posted: Tue Jul 06, 2010 3:39 pm
by ParisHilton
That's if they can keep the players they have!
Back on topic.
Thanks so much for your help. I've finally got the cubes working.
I did spend half a day getting a TI process to work, but with so many elements in the dimensions I was looking at a five hour TI process (and that's when I had taken out my infinite loops).
I'm assuming I have to use CellputN = cellgetn and loop through every element in every dimension, I can't put the same value to every element in a dimension?
The 'key' to doing it via rules seems to be that I can feed a consolidation level, rather than having to feed the leaf levels. What appears to be happening is that by feeding the 'All level' it feeds all the children too.
Am I interpreting this behaviour right? I would love to spend some time, really checking my assumption, but delivery deadlines are looming

Re: Copy data feeder
Posted: Tue Jul 06, 2010 10:45 pm
by lotsaram
5 hours for a TI process is a VERY long time - the record count would be up in the billions for sure. It sounds a bit suspicious to me, did you make sure you were skipping blanks? No sense going to the effort of reading and writing null values!
You are correct in how feeders work. Feeding a consolation is shorthand for feeding all N level descendants. But be very careful with this as this approach usually results in overfeeding which in turn results in an overly dense cube and bad performance.
Re: Copy data feeder
Posted: Wed Jul 07, 2010 6:06 am
by ParisHilton
lotsaram wrote:5 hours for a TI process is a VERY long time - the record count would be up in the billions for sure. It sounds a bit suspicious to me, did you make sure you were skipping blanks? No sense going to the effort of reading and writing null values!
ooh no. I wasn't aware of skipblanks. I'll check out the documentation. Cheers!
( I am doing a test to see if a cell is writeable though

)
Re: Copy data feeder
Posted: Wed Jul 07, 2010 9:58 am
by ParisHilton
I still haven't found out how to skipblanks, but I've turned off the ACSIIOutput I was using for debugging which has improved speed.
I'm still looking at a couple of hours though. I've got dimensions with 200,5,120,100,10,5 and 3 elements. The product of that is a huge number, which I guess is why the TI Process is so slow.
Re: Copy data feeder
Posted: Wed Jul 07, 2010 11:49 am
by lotsaram
ViewExtractSkipZeroesSet(Cube, ViewName, Flag);
You would normally also want
ViewExtractSkipRuleValuesSet(Cube, ViewName, Flag);
ViewExtractSkipCalcsSet(Cube, ViewName, Flag);
Unless your cube is unusually dense I think you will find that your processing time for a cube of that size should be only minutes, maybe seconds ...
Re: Copy data feeder
Posted: Thu Jul 08, 2010 9:20 am
by ParisHilton
Thanks lotasram.
I'll try that and read up on those functions too.
For the time being I've created a solution that involves
1. Adding element to my measures dimension that indicate if a user should be able to view the specific costcentre or costcode intersection. ie. CostCentreVisible, CostCode visible.
2 Creating a 'secure spend' measure.
3.Data is loaded to my 'secureuser' ( username dimension) , to the 'spend' measure.
4 I can then fill securespend with spend when the intersection of the username, costcentre and costcode is a certain value.
(My security model is set by using 1 for visible, 0 for secure against a 'UnspecifiedDImName' Element in all my dims that aren't relevant to the model)
I think this solution adds the minimum number of cells to the cube, while at the same time saving me from intercube feeder headaches(though thanks to forum help , I did get the feeders to work correctly).
I do like the flexibility Tm1 provides for doing all sorts of things, but it's hard as a beginner to know which way to head for every new problem. Forums , by which I mean the people that contribute to it, are one hell of a help when the documentation dries up!