Copy data feeder

Post Reply
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Copy data feeder

Post 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).
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Copy data feeder

Post 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.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: Copy data feeder

Post 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 :lol:

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?
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: Copy data feeder

Post 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......
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Copy data feeder

Post 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.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: Copy data feeder

Post 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 :(
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Copy data feeder

Post 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.
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: Copy data feeder

Post 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 :D )
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: Copy data feeder

Post 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.
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Copy data feeder

Post 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 ...
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: Copy data feeder

Post 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!
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
Post Reply