Page 1 of 1
How to clear all values
Posted: Tue Nov 02, 2010 1:24 pm
by SBrenner
Hi,
is there a simple way to clear all values of a dimension entry (without deleting and recreating the dimension entry)?
The purpose is that I get billing data fpr two dimension entry of a cube. Because the delivered data are the complete snapshot of the previous day and values may be exists anymore I wanted to clear all values before importing the data.
I have no way found to simple clear all the values. I tried to remove and recreate the dimension entry, but this will doesn't work well (the dimension entry will be permanently removed from subset).
Does anyone have an idea?
Many thanks in advance
Steve B.
Re: How to clear all values
Posted: Tue Nov 02, 2010 2:53 pm
by jim wood
Re: How to clear all values
Posted: Tue Nov 02, 2010 5:17 pm
by rkaif
In a TI Process you can use CubeClearData() function which will clear all the values in a cube.
Alternatively, you can also clear a specific portion of a cube using ViewZeroOut() in the Prolog tab of TI Process.
Re: How to clear all values
Posted: Wed Nov 03, 2010 9:53 am
by Steve Vincent
rkaif wrote:In a TI Process you can use CubeClearData() function which will clear all the values in a cube...
Do what now? What version did that appear in? 9.0 makes no mention of it in the help files...
Re: How to clear all values
Posted: Wed Nov 03, 2010 10:26 am
by comma
Steve Vincent wrote:Do what now? What version did that appear in? 9.0 makes no mention of it in the help files...
From 9.5.0 Reference Guide:
CubeClearData
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This clears all of the data in a cube.
This function is much faster than doing an operation such as creating a view to cover the entire
cube, and then doing a ViewZeroOut() to zero out the entire cube.
Note: This call just deletes the cube data, it does not delete and re-create the cube itself. This has
implications when sandboxes are used. If a cube is deleted and then re-created any sandboxes a
user may have will be discarded, since the cube against which those sandboxes were created was
deleted (even though a cube may have been re-created with the same name). If however the Cube-
ClearData() call is used, the sandbox data will still be considered valid, since the cube against which
the sandbox was created continues to exist.
I don't know whether this function exists in version prior to 9.5.0 or not.
Re: How to clear all values
Posted: Wed Nov 03, 2010 12:16 pm
by tomok
comma wrote:I don't know whether this function exists in version prior to 9.5.0 or not.
It does not. It is a great idea and I will definitely use it whenever I build my first model in 9.5.1.
Re: How to clear all values
Posted: Thu Nov 04, 2010 12:43 pm
by Steve Vincent
I've not looked at 9.5 for a while so thanks for that, interesting to know. I can't think of any of our models where an entire cube is cleared, but handy in a development context certainly.
Re: How to clear all values
Posted: Thu Nov 04, 2010 5:05 pm
by Wim Gielis
Interesting to know. I can use it in some models.
In fact, it replaces the statements:
Code: Select all
ViewCreate('CubeName','MyTempView');
ViewZeroOut('CubeName','MyTempView');
ViewDestroy('CubeName','MyTempView');
But if it is a faster method, that would be a more important reason to start using it.
Thanks.
Wim