Page 1 of 1

TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 12:30 pm
by Willi
Hi,

I use TM1 9.5.2.

I write a process wich should copy some data from one cube to another. Done a couple of times. In the Prolog I just define Subsets and a view for the Destination-Cube, Zero it out and destroy View and Subsets.

After that I define Subsets and a View for the Source-Cube and assign it to "DatasourceCubeView". After that I want to process my data and than clean up in the Epilog with destroying the View and the Subsets.

That works without an Error and the View is build correctly. If I do not destroy the View and Subsets I see it is defined after the TI as I expected. Zerosupression is on but there are values. But neither MEtadata nor Data is entered.

Does anyone has an idea where I can look at?

Re: TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 12:34 pm
by declanr
Can you provide your code?

Re: TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 12:51 pm
by mvaspal
Hi
do you have rule calculated values in the source view? if yes, are they fed?

Re: TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 12:55 pm
by lotsaram
mvaspal wrote:Hi
do you have rule calculated values in the source view? if yes, are they fed?
Considering Willi says he looked at the view in cube viewer with zero supression on it is probably much more likely that the reason for nothing happening in the data tab is that the view processing is skipping calcs and one of the dimensions in the view has been assigned a subset that has only C elements which is a pretty common mistake.

Re: TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 12:57 pm
by Willi
Here is the complete Prolog: (the first section for destroying Source-View and Subsets are because I don't delete them in the Epilog during test)

Code: Select all

vCubSrc = 'Planung_Basis';
vCubDst = 'Mathematische_Jahresplanung';
vDimSrc1 = 'Szenario';
vDimSrc2 = 'Monat';
vDimSrc3 = 'Jahr';
vDimSrc4 = 'Produkt';
vDimSrc5 = 'Kennzahl';
vDimDst1 = 'Szenario_MPL';
vDimDst2 = 'Jahr';
vDimDst3 = 'Produkt_MPL';
vDimDst4 = 'Vertrieb_MPL';
vDimDst5 = 'Kennzahl';

vSub	= '}load_Cube_Mathematische_Jahresplanung_Uebertrag_Plan_Daten';
vView	= '}load_Cube_Mathematische_Jahresplanung_Uebertrag_Plan_Daten';

if (ViewExists(vCubSrc, vView) = 1, ViewDestroy(vCubSrc, vView), 0);
if (SubsetExists (vDimSrc1, vSub)=1, SubsetDestroy(vDimSrc1, vSub), 0);
if (SubsetExists (vDimSrc2, vSub)=1, SubsetDestroy(vDimSrc2, vSub), 0);
if (SubsetExists (vDimSrc3, vSub)=1, SubsetDestroy(vDimSrc3, vSub), 0);
if (SubsetExists (vDimSrc4, vSub)=1, SubsetDestroy(vDimSrc4, vSub), 0);
if (SubsetExists (vDimSrc5, vSub)=1, SubsetDestroy(vDimSrc5, vSub), 0);

### Destination-Part clearen ###
if (ViewExists(vCubDst, vView) = 1, ViewDestroy(vCubDst, vView), 0);
if (SubsetExists (vDimDst1, vSub)=1, SubsetDestroy(vDimDst1, vSub), 0);
if (SubsetExists (vDimDst2, vSub)=1, SubsetDestroy(vDimDst2, vSub), 0);
if (SubsetExists (vDimDst3, vSub)=1, SubsetDestroy(vDimDst3, vSub), 0);
if (SubsetExists (vDimDst4, vSub)=1, SubsetDestroy(vDimDst4, vSub), 0);
if (SubsetExists (vDimDst5, vSub)=1, SubsetDestroy(vDimDst5, vSub), 0);

SubsetCreate (vDimDst1, vSub);
SubsetElementInsert(vDimDst1,vSub,'Plan Basis',1);
SubsetCreate (vDimDst2, vSub);
SubsetElementInsert(vDimDst2,vSub,pJahr,1);
SubsetCreatebyMDX(vSub,'{TM1FILTERBYLEVEL( {TM1SUBSETALL( ['|vDimDst3|'] )}, 0)}');
SubsetCreatebyMDX(vSub,'{TM1FILTERBYLEVEL( {TM1SUBSETALL( ['|vDimDst4|'] )}, 0)}');
SubsetCreate (vDimDst5, vSub);
SubsetElementInsert(vDimDst5,vSub,'Absatz',1);
SubsetElementInsert(vDimDst5,vSub,'Umsatz',1);

ViewCreate (vCubDst, vView);
ViewSubsetAssign(vCubDst, vView, vDimDst1, vSub);
ViewSubsetAssign(vCubDst, vView, vDimDst2, vSub);
ViewSubsetAssign(vCubDst, vView, vDimDst3, vSub);
ViewSubsetAssign(vCubDst, vView, vDimDst4, vSub);
ViewSubsetAssign(vCubDst, vView, vDimDst5, vSub);

ViewZeroOut(vCubDst, vView);

if (ViewExists(vCubDst, vView) = 1, ViewDestroy(vCubDst, vView), 0);
if (SubsetExists (vDimDst1, vSub)=1, SubsetDestroy(vDimDst1, vSub), 0);
if (SubsetExists (vDimDst2, vSub)=1, SubsetDestroy(vDimDst2, vSub), 0);
if (SubsetExists (vDimDst3, vSub)=1, SubsetDestroy(vDimDst3, vSub), 0);
if (SubsetExists (vDimDst4, vSub)=1, SubsetDestroy(vDimDst4, vSub), 0);
if (SubsetExists (vDimDst5, vSub)=1, SubsetDestroy(vDimDst5, vSub), 0);

### Source-View definieren ###
if (ViewExists(vCubSrc, vView) = 1, ViewDestroy(vCubSrc, vView), 0);
if (SubsetExists (vDimSrc1, vSub)=1, SubsetDestroy(vDimSrc1, vSub), 0);
if (SubsetExists (vDimSrc2, vSub)=1, SubsetDestroy(vDimSrc2, vSub), 0);
if (SubsetExists (vDimSrc3, vSub)=1, SubsetDestroy(vDimSrc3, vSub), 0);
if (SubsetExists (vDimSrc4, vSub)=1, SubsetDestroy(vDimSrc4, vSub), 0);
if (SubsetExists (vDimSrc5, vSub)=1, SubsetDestroy(vDimSrc5, vSub), 0);

SubsetCreate (vDimSrc1, vSub);
SubsetElementInsert(vDimSrc1,vSub,'Plan',1);
SubsetCreate (vDimSrc2, vSub);
SubsetElementInsert(vDimSrc2,vSub,'Alle Monate',1);
SubsetCreate (vDimSrc3, vSub);
SubsetElementInsert(vDimSrc3,vSub,pJahr,1);
SubsetCreatebyMDX (vSub, '{FILTER( {TM1SUBSETALL( ['|vDimSrc4|'] )}, ['|vDimSrc4|'].[TransferToRV] <> "")}');
SubsetCreate (vDimSrc5, vSub);
SubsetElementInsert(vDimSrc5,vSub,'Absatz',1);
SubsetElementInsert(vDimSrc5,vSub,'Umsatz',1);

ViewCreate (vCubSrc, vView);
ViewSubsetAssign(vCubSrc, vView, vDimSrc1, vSub);
ViewSubsetAssign(vCubSrc, vView, vDimSrc2, vSub);
ViewSubsetAssign(vCubSrc, vView, vDimSrc3, vSub);
ViewSubsetAssign(vCubSrc, vView, vDimSrc4, vSub);
ViewSubsetAssign(vCubSrc, vView, vDimSrc5, vSub);

## Nullwert-Unterdrückung im Source-View ##
ViewExtractSkipZeroesSet (vCubSrc, vView, 1);
## Unterdrückung Rule-berechneter Werte im Source-View ##
ViewExtractSkipRuleValuesSet(vCubSrc, vView, 0);
DatasourceCubeView = vView;

AsciiOutput('D:\Temp\debug.log1',DatasourceCubeView);
AsciiOutput('D:\Temp\debug.log1',vSub|' in '|vDimSrc1|' hat '|NumberToString(SubsetGetSize(vDimSrc1,vSub))|' Elemente');
AsciiOutput('D:\Temp\debug.log1',vSub|' in '|vDimSrc2|' hat '|NumberToString(SubsetGetSize(vDimSrc2,vSub))|' Elemente');
AsciiOutput('D:\Temp\debug.log1',vSub|' in '|vDimSrc3|' hat '|NumberToString(SubsetGetSize(vDimSrc3,vSub))|' Elemente');
AsciiOutput('D:\Temp\debug.log1',vSub|' in '|vDimSrc4|' hat '|NumberToString(SubsetGetSize(vDimSrc4,vSub))|' Elemente');
AsciiOutput('D:\Temp\debug.log1',vSub|' in '|vDimSrc5|' hat '|NumberToString(SubsetGetSize(vDimSrc5,vSub))|' Elemente');
vCount = 0;
The Values in the Source are not Calculated.

Re: TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 12:59 pm
by Willi
lotsaram wrote:
mvaspal wrote:Hi
do you have rule calculated values in the source view? if yes, are they fed?
Considering Willi says he looked at the view in cube viewer with zero supression on it is probably much more likely that the reason for nothing happening in the data tab is that the view processing is skipping calcs and one of the dimensions in the view has been assigned a subset that has only C elements which is a pretty common mistake.
That is true.

Code: Select all

SubsetCreate (vDimSrc2, vSub);
SubsetElementInsert(vDimSrc2,vSub,'Alle Monate',1);
This is a C-Element. That's not possible?

Re: TI Process Metadata and Data Tab are not processed

Posted: Mon Oct 20, 2014 1:06 pm
by declanr
Willi wrote:
lotsaram wrote:
mvaspal wrote:Hi
do you have rule calculated values in the source view? if yes, are they fed?
Considering Willi says he looked at the view in cube viewer with zero supression on it is probably much more likely that the reason for nothing happening in the data tab is that the view processing is skipping calcs and one of the dimensions in the view has been assigned a subset that has only C elements which is a pretty common mistake.
That is true.

Code: Select all

SubsetCreate (vDimSrc2, vSub);
SubsetElementInsert(vDimSrc2,vSub,'Alle Monate',1);
This is a C-Element. That's not possible?
If you want it to still pick it up then just add:

Code: Select all

ViewExtractSkipCalcsSet ( CubeName, ViewName, 0 );
Whether or not the metadata/data tabs will then error or not depends on what you are doing with the data.

Re: TI Process Metadata and Data Tab are not processed

Posted: Tue Oct 21, 2014 9:31 am
by Willi
Thx, that did the trick!