Batching Dimension Write requests

The Dimension Write XML request can be sent in multiple parts:

  • The first batch contains FirstBatch="true" LastBatch="false"
  • Following batches contain FirstBatch="false" LastBatch="false"
  • The last batch contains FirstBatch="false" LastBatch="true"
  • You can put properties (dimension properties) in the last batch only.
  • You can define hierarchy properties in any batch, but repeated definition overwrites the previously defined properties.

First batch

In this example, replace \t with a horizontal tabulator.

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="6" Class="Dimension" Method="Write">
    <Alea:Dimension Name="Org" FirstBatch="true" LastBatch="false">
      <Alea:Description>Organization structure</Alea:Description>
      <Alea:Hierarchy Name="Org as of 2014">
        <Alea:Elements>N\tFire Department
N\tPolice Department
N\tWaste Removal</Alea:Elements>
      </Alea:Hierarchy>
      <Alea:Hierarchy Name="Org as of 2015 – create from scratch">
        <Alea:Elements>N\tFire Department
N\tPolice Department
N\tWaste Removal</Alea:Elements>
      </Alea:Hierarchy>
    </Alea:Dimension>
  </Alea:Request>
</Alea:Document>

Last batch

In this example, replace \t with a horizontal tabulator.

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="7" Class="Dimension" Method="Write">
    <Alea:Dimension Name="Org" FirstBatch="false" LastBatch="true">
      <Alea:Description>Organization structure</Alea:Description>
      <Alea:Hierarchy Name="Org as of 2014">
        <Alea:Elements>C\tEmergency
!\tEmergency\tFire Department\t1
!\tEmergency\tPolice Department\t1
C\tStandard
!\tStandard\tWaste Removal\t1
C\tAll
!\tAll\tEmergency\t1
!\tAll\tStandard\t1</Alea:Elements>
      </Alea:Hierarchy>
      <Alea:Hierarchy Name="Org as of 2015 – create from scratch">
        <Alea:Elements>C\tAll
!\tDepartments\tFire Department\t11
!\tDepartments\tPolice Department\t11
!\tAll\tWaste Removal\t11</Alea:Elements>
        <Alea:Properties>
          <Alea:DefaultMember Name="All" />
          <Alea:LevelNames>
            <Alea:Level Number="0" Name="All" />
              <Alea:Level Number="1" Name="Departments" />
            </Alea:LevelNames>
        </Alea:Properties>
      </Alea:Hierarchy>
      <Alea:Properties>
        <Alea:DefaultHierarchy Name="Org as of 2015 – create from scratch" />
      </Alea:Properties>
    </Alea:Dimension>
   </Alea:Request>
</Alea:Document>