Page 1 of 1
TI CellgetN and CellPUTN
Posted: Fri Aug 22, 2014 9:44 pm
by sathishh.mk
Hi,
Below is the code i trying to load the data into Cube using TI and Cube view.
Steps followed:
1) Data source as Cube View
2) Created a cube view with all zero level dims(Dynamically - Prolog)
3) Data tab i have wrote below code to copy/load
4) CellgetN is using to get next week data and and CellputN is using to load the CellgetN data.
Really i am wondering after testing,the code is not working as expected
TI Code:
vMeasure='F_EOH Qty'
V_ABCMeasure = CellgetN('ABC',Product_Dim,ATTRS('Date_Dim', Date_dim , 'a_NEXT_WEEK_END_DT' ) ,Version,WSize_Dim,PTech_Dim,'QC_F_Qty');
CellPutN(V_ABCMeasure,'ABC',Product_Dim,Date_dim,Version,WSize_Dim,PTech_Dim,vMeasure);
Any pointers or suggestions are really appreciated.
Regareds,
Sathish
Re: TI CellgetN and CellPUTN
Posted: Fri Aug 22, 2014 9:50 pm
by sathishh.mk
Some more information:
TI Process running without any issues, the only problem data is not loading properly.
Any pointers would be really helpful to me.
Regards,
Sathish
Re: TI CellgetN and CellPUTN
Posted: Sat Aug 23, 2014 2:50 am
by BariAbdul
Looks like you are trying to copy from one measure to another within the same cube ABC,Screenshot of your variable tab would be helpful.Thanks
Re: TI CellgetN and CellPUTN
Posted: Sat Aug 23, 2014 4:50 pm
by Wim Gielis
Did you use the function AsciiOutput or TextOutput in the Data tab of the process, to export variables to a text file?
If no text file is created, you know that something is wrong with the Data source (no data in the source, most probably).
Please check other topics here at the forum as this kind of error is frequently the cause of processes not running correctly.
Re: TI CellgetN and CellPUTN
Posted: Sun Aug 24, 2014 1:13 am
by sathishh.mk
Hi,
@BariAbdul:
Yes, I am trying to copy from one measure to another within the same cube ABC based on Dates.
Please find the attached variables screenshot and below Prolog Code for reference:
@Wim:
I will check as per your suggestion
##### Destroy the View and Subsets if exists #####
ViewDestroy('ABC','DefaultView_Measures_V2');
subsetDestroy('Product_Dim', 'Product_Dim_V2');
subsetDestroy('Date_dim', 'Date_dim_V2');
subsetDestroy('Version', 'Version_V2');
subsetDestroy('WSize_Dim', 'WSize_Dim_V2');
subsetDestroy('PTech_Dim', 'PTech_Dim_V2');
subsetDestroy('D_Measure', 'DefaultView_Measures_V2');
##### Create the Subsets and View #####
SubsetCreatebyMDX('Product_Dim_V2', '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Product_Dim] )}, 0)}');
SubsetCreatebyMDX('Date_dim_V2', '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Date_dim] )}, 0)}');
SubsetCreatebyMDX('Version_V2', '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Version] )}, 0)}');
SubsetCreatebyMDX('WSize_Dim_V2', '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [WSize_Dim] )}, 0)}');
SubsetCreatebyMDX('PTech_Dim_V2', '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [PTech_Dim] )}, 0)}');
SubsetCreatebyMDX('DefaultView_Measures_V2', '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [D_Measure] )}, 0)}');
ViewCreate('ABC','DefaultView_Measures_V2');
##### Assign the Subsets to created View #####
ViewSubsetAssign('ABC','DefaultView_Measures_V2', 'Product_Dim', 'Product_Dim_V2');
ViewSubsetAssign('ABC','DefaultView_Measures_V2', 'Date_dim', 'Date_dim_V2');
ViewSubsetAssign('ABC','DefaultView_Measures_V2', 'Version', 'Version_V2');
ViewSubsetAssign('ABC','DefaultView_Measures_V2', 'WSize_Dim', 'WSize_Dim_V2');
ViewSubsetAssign('ABC','DefaultView_Measures_V2', 'PTech_Dim', 'PTech_Dim_V2');
ViewSubsetAssign('ABC','DefaultView_Measures_V2', 'D_Measure', 'DefaultView_Measures_V2');
Regards,
Sathish
Re: TI CellgetN and CellPUTN
Posted: Mon Aug 25, 2014 12:13 pm
by BariAbdul
I would go with Wim on this one,Please do asciioutput to ensure there are values to copy over.Thanks
Re: TI CellgetN and CellPUTN
Posted: Wed Aug 27, 2014 2:13 pm
by uchow10
Make sure you are using the created view as your datasource. Sometimes or most of the time I point to an existing view to get my variables but in the prolog i create a different view to be used.
use the following local variables to specifically designate your created view:
DatasourceNameForServer
DatasourceCubeview