Hello,
I've been facing some issues exporting a cube into a csv file.
I created an App engine script to do this exportation wich already works, my issue as to do with the time it takes to process - it takes to long.
This how I get the dataArea:
OLAPDataArea values = OLAPCreateDataArea(olapconnection,
cube,
OlapDataAreaIncludeB | OlapDataAreaSuppressNull,
OlapDataAreaOperatorNone,
0.0,
OlapDataAreaOperatorNone,
0,
month+"_"+time,
cycle,
version,
OlapDataAreaAllCells,
OlapDataAreaAllCells,
OlapDataAreaAllCells,
OlapDataAreaAllCells,
OlapDataAreaAllCells,
OlapDataAreaAllCells,
currency
);
then I iterate it like so
foreach(OLAPCell cell in values)
{ ... }
I have some 'if' conditions in that 'foreach', but it's not the root of the problem. I tested the script with the 'foreach' empty and got the same times.
For the filter that I'm using, the final result is a csv file with up to 26 000 lines, and it takes between 15 min to 20 min.
Before it was taking 2 hours. This was due to me using 'Concat()' to make the csv. I then changed it to 'StringArray' and it greatly reduced the time - Not sure if there is a better way to do this...
But, all of this applies to when I'm using the OlapDataAreaIncludeB operator for the the dataArea. The thing is, I need to use calculated values aswell.
And if I replace the OlapDataAreaIncludeB with OlapDataAreaIncludeC, the script just stalls.
Today, I ran a test, I put a break in the foreach and run it to see how long it would take. It took one hour!!!!
It took one hour to iterate over one single cell.
My guess is that i'm doing something wrong, or there is something else going on.