Dimension Write

Creates or changes a dimension. An existing dimension is always overwritten, but parts can be taken over by various ways using dimension and hierarchy templates.

Example with implicit hierarchy and BreakOnError request

In this request, replace \t with an actual horizontal tabulator.

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1" Class="Dimension" Method="Write">
    <Alea:Dimension Name="DimTest" FirstBatch="true" LastBatch="true" BreakOnError="false" Delimiter="\t">
      <Alea:Elements>N\tActual
N\tBudget
C\tVariance
S\tStringElem
N\tFault[Elem
C\tVariance
\tActual
\tBudget\t-1</Alea:Elements>
    </Alea:Dimension>
  </Alea:Request>
</Alea:Document>

The Alea:Elements tag contains:

  • The list of the elements, with their types and names.
    • The possible types are N (base), C (consolidated), S (string), or R (rule).
    • Type R is deprecated. Use cube rules instead.
  • The relations between elements.
    • Optionally, the element weight. The default is 1.
    • The alternate format is: !\tParent\tChild<\tweight>.

Further characteristics of the Alea:Elements tag:

  • By default, the fields of a line are separated by a horizontal tabulator.
  • The separator can be changed using the Delimiter attribute of the Alea:Dimension tag.
  • Each line, except the last one, ends with a line break.
  • There must be no line breaks or spaces between the opening Alea:Elements tag and the first line.
  • There must be no line breaks or spaces between the last line and the closing Alea:Elements tag.

This request contains an element with the illegal character "[". Because BreakOnError is set to "false", the request does not fail, but creates or changes the dimension omitting the corresponding element. The offending element is returned including the error code and line number.

Answer if BreakOnError="false"

Horizontal tabulators are returned as such, not as \t.

<Alea:Document xmlns:Alea="http://www.misag.com"> 
  <Alea:Request RequestID="1">
    <Alea:Return> 
      <Alea:Dimension Name="DimTest"> 
        <Alea:Hierarchy Name="DimTest"> 
          <Alea:Elements LinesCount="1">196\t6\tN\tFault[Elem</Alea:Elements> 
        </Alea:Hierarchy> 
      </Alea:Dimension> 
    </Alea:Return>   
  </Alea:Request> 
</Alea:Document>

If BreakOnError is set to "true", this request fails, and the dimension is not created or changed. The default for BreakOnError is "false".

Answer if BreakOnError="true"

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1">
    <Alea:Return>
      <Alea:Dimension Name="DimTest">
        <Alea:Hierarchy Name="DimTest" />
      </Alea:Dimension>
    </Alea:Return>
    <Alea:Error ErrorID="196" ErrorPosition="6" />
  </Alea:Request>
</Alea:Document>