Cube DataareaCopy
Copies values from the source to the target data area. Source and target data areas can be from the same cube or from different cubes.
A data area must be defined before using Cube DataareaCopy
.
This is done with Cube DataareaDefine
. The defined cube is
then the source. The NonExistentCellSuppression
and UseOnlyBasicElements
XML attributes need to be defined in both
requests. The XML attributes in Cube DataareaCopy
overwrite
the corresponding XML attributes in Cube DataareaDefine
.
If, during one DataareaCopy operation, multiple values are written to the same target cell, the last of these values in the internal structure will be in the target cell after the operation.
Request
In this request, the FINANCE cube is used as the source and the SALES cube is used as the target. The PRODUCT dimension only exists in SALES. The ACCOUNT dimension in FINANCE is comparable to the PROFIT dimension in SALES and mapped accordingly.
<Alea:Document xmlns:Alea="http://www.misag.com">
<Alea:Request RequestID="1" Class="Cube" Method="DataareaDefine">
<Alea:DataArea Cube="FINANCE" NonExistentCellSuppression="true" UseOnlyBasicElements="true">
<Alea:DimFilter Dimension="ACCOUNT">
<Alea:Element Name="I300016" />
</Alea:DimFilter>
<Alea:DimFilter Dimension="TIME">
<Alea:Element Name="05_2016" />
</Alea:DimFilter>
</Alea:DataArea>
</Alea:Request>
<Alea:Request RequestID="2" Class="Cube" Method="DataareaCopy">
<Alea:DataCopy Cube="SALES" Type="Relative" Factor="1.25" NonExistentCellSuppression="true" UseOnlyBasicElements="false">
<Alea:DimFilter Dimension="PROFIT" Source="ACCOUNT">
<Alea:Element Name="Revenue" Source="I300016" />
</Alea:DimFilter>
<Alea:DimFilter Dimension="TIME">
<Alea:Element Name="05_2017" Source="05_2016" />
</Alea:DimFilter>
<Alea:DimFilter Dimension="PRODUCT" Element="W8000/155" Hierarchy="Tire Size" />
</Alea:DataCopy>
</Alea:Request>
<Alea:Request RequestID="3" Class="Cube" Method="DataareaDestroy" />
</Alea:Document>
This table describes the XML attributes and their possible values:
XML attribute | Value |
---|---|
Type |
This XML
attribute indicates the type of change and can be Relative or Absolute. Relative:
The values from the source cells are multiplied by the Absolute:
The |
Factor |
This XML attribute correlates with Type and is optional. The default for Relative is 1 and
the default for Absolute is 0. |
NonExistentCellSuppression
|
This XML
attribute can be true or false. It specifies if empty cells are included in the
respective request or not. For A special case is that a string cell can contain an empty string. That is not the same as an empty cell. |
UseOnlyBasicElements
|
This XML
attribute can be true or false. If it is false, then all base and consolidated cells
are used and rules on cells are calculated. If it is true, then consolidated cells
are excluded and rules on base cells are not calculated. Instead, values on base
cells behind a rule are copied. It is also possible to map a consolidated element in the source to a base element in the target. Then this XML attribute must be false. |
DimFilter
|
Mapping of elements from source dimensions to target dimensions. |
If there is no DimFilter
for a dimension (for example, INTERCO in the request) then this dimension must exist in both
cubes and identical mapping of elements is used.
If a Dimension
XML
attribute is specified but a Source
XML attribute is not
specified in DimFilter
, like TIME in the
request, then TIME must exist in the source cube, too. If there are elements listed in
DimFilter
then this list specifies the mapping between them. For all
other elements identical mapping is used.
If both the Dimension
and Source
XML attributes are specified in DimFilter
then both dimensions must contain the same elements and the same
parent-child relations.If there is a dimension which is only in the target cube (PRODUCT in
the request) then exactly one element must be specified there.
Answer
<Alea:DocumentWrapper xmlns:Alea="http://www.misag.com">
<Alea:Document>
<Alea:Request RequestID="1">
<Alea:Return />
</Alea:Request>
<Alea:Request RequestID="2">
<Alea:Return />
</Alea:Request>
<Alea:Request RequestID="3">
<Alea:Return />
</Alea:Request>
</Alea:Document>
</Alea:DocumentWrapper>
Error
This error is returned if, for example, a consolidated element is specified in the target cube:
<Alea:DocumentWrapper xmlns:Alea="http://www.misag.com">
<Alea:Document>
<Alea:Request RequestID="1">
<Alea:Return />
</Alea:Request>
<Alea:Request RequestID="2">
<Alea:Error ErrorID="6" />
</Alea:Request>
<Alea:Request RequestID="3">
<Alea:Return />
</Alea:Request>
</Alea:Document>
</Alea:DocumentWrapper>
Example 1
This is an example for identical mapping of different dimensions:
<Alea:DimFilter Dimension="CURRTYPE_NEW" Source="CURRTYPE" />
The CURRTYPE dimension must exist in the source cube.
Example 2
This is an example of mapping the same dimensions:
<Alea:DimFilter Dimension="CURRTYPE" />
DimFilter
can be omitted in
this case.
The CURRTYPE dimension must exist in both cubes. The elements are mapped identically.
Example 3
This is an example of mapping a non-existing source dimension:
<Alea:DimFilter Dimension="CURRTYPE_NEW" Element="NEW" />
If the CURRTYPE_NEW dimension does not exist in the source cube, all cell values are copied to the target cube with the specified element as coordinate.
Example 4
This is an example of mapping a non-existing source dimension and the target element is in a non-default hierarchy:
<Alea:DimFilter Dimension="PRODUCT" Element="W8000/155" Hierarchy="Tire Size" />
Example 5
This is an example of mapping an element of the same dimension:
<Alea:DimFilter Dimension="CURRTYPE">
<Alea:Element Name="myEUR" Source="EUR" />
</Alea:DimFilter>
Example 6
This is an example of a non-existing target dimension:
<Alea:DimFilter Dimension="PROFIT">
<Alea:Element Name="Direct Production Cost per Unit" />
</Alea:DimFilter>
If the PROFIT dimension does not exist in the target cube, the specified element is used as a coordinate for the PROFIT dimension of all cell values to be copied from the source cube.
Example 7
This is an example of a non-existing target dimension with the source element being in a non-default hierarchy:
<Alea:DimFilter Dimension="PRODUCT">
<Alea:Element Name="W8000/155" Hierarchy="Tire Size" />
</Alea:DimFilter>
Example 8
This is an example of mapping an element of a non-default hierarchy to an element of a different non-default hierarchy in the same dimension:
<Alea:DimFilter Dimension="PRODUCT">
<Alea:Element Name="W8000/155" Hierarchy="Tire Size" Source="W7000/205" SourceHierarchy="Speed Rating" />
</Alea:DimFilter>