Batching Cube Read requests
If there is more than 1 MB of information to return, the answer is segmented and
recurring calls in the same session are needed until
LastBatch="true"
is
returned. The first and the following segments in the answers are marked:
LastBatch="false"
LinesCount=
<number of delivered entries in the string>
The last segment is marked:
LastBatch="true"
LinesCount=
<number of delivered entries in the string>
Request 1
This example shows the definition of a data area and the reading of the values of the cube:
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="1" Class="Cube" Method="DataareaDefine">
<Alea:DataArea Cube="Sales" NonExistentCellSuppression="true" UseOnlyBasicElements="true" />
</Alea:Request>
<Alea:Request RequestID="2" Class="Cube" Method="Read">
<Alea:DataQuery FirstBatch="true" QuotedStrings="true" Delimiter=";">
<Alea:DataArea NonExistentCellSuppression="true" UseOnlyBasicElements="true" />
</Alea:DataQuery>
</Alea:Request>
</Alea:Document>
Answer 1
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="1">
<Alea:Return/>
</Alea:Request>
<Alea:Request RequestID="2">
<Alea:Return>
<Alea:CellBatch LinesCount="11960" LastBatch="false">"01_2011";"Actual";"LC";"IFRS";"unassigned";"unassigned";"AS600/175";"Price per Unit";79.26629
"01_2011";"Actual";"LC";"IFRS";"unassigned";"unassigned";"AS600/185";"Price per Unit";61.611527
…
"06_2011";"Budget";"LC";"IFRS";"C1202";"ED_3003";"C2002/205";"Sales Volume";338.638943
</Alea:Return>
</Alea:Request>
</Alea:Document>
Request 2
This request is neither the first nor the last:
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="2" Class="Cube" Method="Read">
<Alea:DataQuery FirstBatch="false" />
</Alea:Request>
</Alea:Document>
Answer 2
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="2">
<Alea:Return>
<Alea:CellBatch LinesCount="12477" LastBatch="false">
…
</Alea:CellBatch>
</Alea:Return>
</Alea:Request>
</Alea:Document>
Request 3
This request returns the information that it returned the last batch:
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="25" Class="Cube" Method="Read">
<Alea:DataQuery FirstBatch="false" />
</Alea:Request>
</Alea:Document>
Answer 3
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="25">
<Alea:Return>
<Alea:CellBatch LinesCount="9152" LastBatch="true">
…
</Alea:CellBatch>
</Alea:Return>
</Alea:Request>
</Alea:Document>