If you are unable to create a new account, please email support@bspsoftware.com

 

How to: remove categories before generate powercube with DOS line?

Started by DALSOM, 01 Aug 2011 11:12:59 AM

Previous topic - Next topic

DALSOM

Hi,
Look at this situation on Transformer 8.4.
You have a project and cube created, and you decide change a code from a description of an element from a Dim table. Then try to generate the powercube again!  Error! Because the element you changed has and entrance on other category.

Solve manually, delete the entire category and generate the cube again.

But, how can I do this with the command line?

This is my command line and it does not : cogtr.exe -n1 -i -s "My.pyj"  >>MyLog.txt

If you do not delete manually the category, no errors stroken, but does not appears new changes.  So you must to remove the category manually in order this happens.

Then , how can i remove all the categories, in order regenerate all of them when powercube generates,  with a DOS command line?

Thanks in advance!!

Arsenal

Why would the DB want to change codes frequently?

Anyway, I'll assume that you're talking about a category uniqueness violation error. You have to understand that by deleting and re-generating categories at every cube build, you'll be adding an overhead to the cube build time - this overhead will depend upon the number of categories. Large number of categories = large overhead.

A better solution would be to have the DBA ensure that the code doesn't change and remains unique. If DBA cannot ensure that, you can always create a calculation(such as a concatenation of two fields that you know will end up being unique every time) and base your code off of this calculation

that said, to the best of my knowledge, there is no way to achieve the functionality you're asking about. There is a cleanhouse option but that will remove everything that falls within the criteria specified..manually created categories etc. all will have to be recreated. Maybe someone else can chime in?

One indirect way is to manually delete the categories once and then DO NOT SAVE. Drop the -s option from your command line build. This way, Transformer will be forced to generate categories across every dimension everytime it builds..please know about the cube build time impact of this as stated above.

Another option you can consider is to go back to the source of the problem, that is the category uniqueness issue mentioned above. You may try the "move" option located right next to the unique option in the level properties. This option will move the offending category to the correct level everytime it finds a violation.  But be aware of your reporting requirements and whether this wil work for you or no

DALSOM

Hi, and thanks by answer me.
This is the situation :

The user had full control over the descriptions of each description dimension.
So, at some times, they decide to change a description of a code, or a name of a description. Had happenned a little couple of times.  Then, when try to generate the power cube with a new description, this description had a path trougth other way. See this example :

Dim  ------- All Groups of Cases
Level 3 -----  Group of Case
Level 2 -----  Case Names Reviewed
Level 1 -----  Case Name

Dim_case  data :

cod_case ---Nom_case  --- cod_case_rv
1  ----------- csae 1  -------- 1
2  ----------- case 1  -------- 1
3 ----------- case 2 ---------- 2

Dim_case_rv
cod_case_rv ---------  Nom_case_rv  ------- Cod_case_group
1   --------------------  Case 1 --------------- 1
2   --------------------  Case 2 --------------- 2

Dim_case_group
cod_case_group ---  nom_case_group
1 -------------------- Group 1
2 -------------------- Group 2

So, if use decide to change the group to [Case 1] reviewed case to 2, then i do the proccess of
delete the category and generate the power cube, this happens because user changed his mind.  And its happends for some times, but happends!  So I do not want to be allways  changing manually the project. But yes, this will affect my end users reports, and can cause error on some of them.

I can not asure code will stay unique, because user is changing descriptions and codes.
But, instead, i can see when the user has done a violation, and until this happens, i must let free the user for changes.

But, still i am interested on the cleanhouse option and its use and functionallity. Thanks.


bdbits

Arsenal's advice is good. Is there an underlying key or a way of creating a surrogate key independent of the code/description? If not, I think you will continue to have issues trying to maintain relationships. If you can use a key, there are ways to model changing dimensions.

To create categories when generating the cube, use -c on your command line.

http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/topic/com.ibm.swg.im.cognos.ug_cogtr.8.4.0.doc/ug_cogtr_id11862CLIOptionsList.html#CLIOptionsList