How to delete partial data in cube

Post Reply
plkkw
Posts: 23
Joined: Wed Sep 21, 2011 6:18 am
OLAP Product: TM1
Version: 9.4.1
Excel Version: 2003

How to delete partial data in cube

Post by plkkw »

Hi,

I am new in TM1. I would like to know how to delete some (or partial) data in tm1 cube. Just set the value to "zero"? or any other function I could use. Please advise.
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to delete partial data in cube

Post by Alan Kirk »

plkkw wrote: I am new in TM1. I would like to know how to delete some (or partial) data in tm1 cube. Just set the value to "zero"? or any other function I could use. Please advise.
There are many different ways that you can do it. Typically you'd start by creating a view of the data that you want to delete. If you do that at N level, you can enter a single zero and copy the zero across the range.

Alternatively, if you do it at a consolidated level, you can use data spreading to clear the whole lot at one. (The data spreading clear function can be accessed from the right click menu, amongst other ways.) This is extremely powerful, but also potentially dangerous; be very sure that you have specified the actual area that you want to clear out, and nothing further.

If it's an area that you need to clear out on a regular basis, you'd normally automate the process by creating a TurboIntegrator chore, though again that will start with you creating the view that you want to zero out. You can use the ViewZeroOut function to do that in the Prolog, or you can loop through the view's records and set each one to zero in the data tab. (You might do that if you want to keep track of how many cells are zeroed out, for instance.)

However defining the view that you want to clear is always the starting point, no matter which method you use.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to delete partial data in cube

Post by lotsaram »

plkkw wrote:Hi,

I am new in TM1. I would like to know how to delete some (or partial) data in tm1 cube. Just set the value to "zero"? or any other function I could use. Please advise.
If you go to http://code.bedrocktm1.org/cgi-bin/run.sh/dir?ci=tip then you can find ready made processes that will do the view creation and zero out for you. All you need to do is pass in a filter of the dimension/element intersections that should be cleared.
The process you want to look at is Bedrock.Cube.Data.ZeroOut (however note that this process calls other processes so you would want this process and all the processes starting with Bedrock.Dim.Sub.Create...)

Understanding the code in these processes and how they work may be too advanced for where you are at right now but that essentially is also the point of the bedrock project. All you need to do is to supply the correct filter and the pre-written generic processes will do the rest. Think of it like function calls for TM1.
plkkw
Posts: 23
Joined: Wed Sep 21, 2011 6:18 am
OLAP Product: TM1
Version: 9.4.1
Excel Version: 2003

Re: How to delete partial data in cube

Post by plkkw »

HI,

HOw about if it is string? which value i should set so that TM1 take it as deletion?
User avatar
qml
MVP
Posts: 1096
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: How to delete partial data in cube

Post by qml »

You can either use the widespread approach of ViewZeroOut described above which will also clear all strings values, or assign an empty sting value to the cell(s) you are trying to clear in a fashion similar to this:

Code: Select all

CellPutS ( '', cube, dim1, dim2, dim3 );
Of course ViewZeroOut is easier to program and generally faster, but the choice is yours.
Kamil Arendt
plkkw
Posts: 23
Joined: Wed Sep 21, 2011 6:18 am
OLAP Product: TM1
Version: 9.4.1
Excel Version: 2003

Re: How to delete partial data in cube

Post by plkkw »

Hi lotsaram and qml,

Thanks for your replies, but I have a question that how prolong program related to tm1?
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to delete partial data in cube

Post by Alan Kirk »

plkkw wrote:Hi lotsaram and qml,

Thanks for your replies, but I have a question that how prolong program related to tm1?
They're referring to the TurboIntegrator (commonly known as TI) Extraction, Translation and Loading (ETL) tool. (Actually I just re-scanned the thread, and found that I was the one who referred to the Prolog. So read that as "I was referring to..." etc. Both Lotsaram and QML were also referring to TI, though.) If you look under TM1 Help you'll find an entire "book" relating to that topic, and there should be a .pdf of it somewhere in your TM1 directories as well.

TurboIntegrator is the tool that you'll use for importing data from other systems, or doing repetitive or high volume data manipulation tasks such as copying from one version to another. If you're a TM1 administrator you'll almost certainly need to get around to using it eventually, but it will take you a while to learn it and it's not something that you can just jump into without reading through the manual and working through some of the examples in your development environment.

For reference, the bulk of a TI process is made up of four "tabs":
Prolog runs before anything else;
Metadata loops through the data source (if there is one) one row at a time. On this tab you do things like updating your dimensions by adding new elements;
Data also loops through the data source (again, if there is one) one row at a time and is used to write data to the cube;
Epilog runs after the last row of data is processed on the data tab and is used for any "clean-up" tasks.

If you're an end user then you may not end up using TI at all, and you certainly won't be writing TI processes. (Though you may run some that the Administrators have written for you.)

But as I said, if you are an Admin you'll need it at some point, and in that case I'd suggest taking a browse through the manual as soon as you can. Don't expect to "get" it on the first reading, but don't be discouraged; it's actually not a hard tool to learn, as long as you're prepared to put in some time on it. And of course if you have any questions on it, there's a wealth of experience around here to ask them to.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply