I would like to ask you about what I have done here...
I am creating the TI process. In there, I am creating a view on TI using scripts, set the view as the datasource and then pull all data to another cube. All in one TI process. Here is the code that I used.
Code: Select all
CubeName = 'Cash flow';
ViewName = 'ExportDataToCube';
DimName = 'Months';
SubsetName = 'MonthName';
ViewExist = ViewExists(CubeName, ViewName);
if(ViewExist = 1);
ViewDestroy(CubeName, ViewName);
Endif;
ViewCreate(CubeName, ViewName);
ViewTitleDimensionSet(CubeName, ViewName, 'Measure');
ViewTitleElementSet(CubeName, ViewName, 'Versi', 3);
ViewSubsetAssign(CubeName, ViewName, DimName, SubsetName);
ViewColumnDimensionSet(CubeName, ViewName, 'PeriodeMinggu', 1);
ViewRowDimensionSet(CubeName, ViewName, 'Account',1);
#ViewZeroOut(CubeName, ViewName);
DataSourceType = 'VIEW';
DatasourceNameForServer = CubeName;
DatasourceCubeview = ViewName;
Usually when we create TI and use view as a datasource, the next step is set the variables name on variable tab, and then, we can continue to prolog, metadata, data, and epilog stuff and we write our codes / scripts there. But the problem here, Because I create view manually using script and I have to set the datasourceview, but I dont know how to get these variables. Do you mind to explain to me how to use the variable? I tried to find the answer in this forum to figure out the problems, but I cant find the answer that would solve my problems.
Thanks a lot for your answer.. your explanation would really help me a lot...