If you've not read the Part I of this series read that one here.
Let's recap the steps that we did till now.
Depending on the user selection we set a substitution variable, exported data from the cube that we are on (App A)
Now the rule looks like this.
This is the from my spool file.
I'm using a subvar as my file name!!! (After writing this I found that Mike Henderson has used entire Calc commands as subvars). All those ugliness in the calc script (the one above) is gone in the logs :)
If you look at the file name, it is named according to the user selection.
The one highlighted is the time stamp, if you look at that in EXCEL is is 20150924165756.
Now I got my file, over to Step 2
Again I'm staying in App A and going to trigger a clear in App B/App C depending on the user selection.
Now below given is my clear script.
Now that the data is cleared I've to import data into the App.
Here is the script that does it. I'm using a load rule, so that I can remove Product dimension.
Data cleared, data loaded, now it's the time to aggregate the data in App B/App C all the time we are in App A!!!
Here is the spool file from Step 2.
Now the entire Calc.
See those IF condition that is the one which tells me which cube I should go depending on the user selection.
I think the near future (next patch release of Calc Manager) will (hopefully?)include two new functions @CalcMgrMDXDataCopyRTP, @CalcMgrMDXExportRTP. It might make it, it might not (so don't hold me to it)
@CalcMgrMDXDataCopyRTP(key,user,pwd,srcApp,srcDB,dtnApp,dtnDB,colQuery,rowQuery,whereQuery,srcMappings,targetMappings,targetPOVCols,maxRowsPerPage,arguments,loggerName)
Yes that has a where clause
@CalcMgrMDXExportRTP(key,user,pwd,fileName,application,database,server,columnAxisMdx,rowAxisMdx,seperator,missing,useUniqueName,useAliasName,supressZeros,rowHeaders,args)