Getting Information about Cube Import Status

Below is the example of using the GetCubeImport operation for checking status of the data import, which was started by means of the SetCubeImport operation. The request contains data loader moniker. The response contains information about import execution status and information about possible execution errors.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetCubeImport xmlns="http://www.fsight.ru/PP.SOM.Som">
<tCubeImport xmlns="">
  <id>APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ</id>
  </tCubeImport>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <parsOwnDefVals>true</parsOwnDefVals>
  <execute>true</execute>
  <resultType>true</resultType>
<executeResult>
<duplicates>
  <start>0</start>
  </duplicates>
<nulls>
  <start>0</start>
  </nulls>
  </executeResult>
  </pattern>
  </tArg>
  </GetCubeImport>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetCubeImportResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="0" hf="0">
  <i>FORNEWCUBE</i>
  <n>For new cubes</n>
  <k>5881</k>
  <c>0</c>
  <p>5845</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
<execute>
  <state>None</state>
  <extendedResult>1</extendedResult>
  <useWaitings>0</useWaitings>
  </execute>
  <resultType>Cube</resultType>
  <loadDuplicates>0</loadDuplicates>
  </meta>
  </GetCubeImportResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetCubeImport" :
{
"tCubeImport" :
{
"id" : "APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"execute" : "true",
"resultType" : "true",
"executeResult" :
{
"duplicates" :
{
"start" : "0"
},
"nulls" :
{
"start" : "0"
}
}
}
}
}
}

JSON response:

{
"GetCubeImportResult" :
{
"id" :
{
"id" : "APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "FORNEWCUBE",
"n" : "For new cubes",
"k" : "5881",
"c" : "0",
"p" : "5845",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"execute" :
{
"state" : "None",
"extendedResult" : "1",
"useWaitings" : "0"
},
"resultType" : "Cube",
"loadDuplicates" : "0"
}
}
}
public static GetCubeImportResult GetCubeImportExecuteInfo(CubeImportId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetCubeImport()
{
tArg = new GetCubeImportArg()
{
pattern = new CubeImportMdPattern()
{
execute = true,
executeResult = new CubeImportExecuteResultPattern()
{
duplicates = new ListRange() { start = 0 },
nulls = new ListRange() { start = 0 }
},
resultType = true
}
},
tCubeImport = moniker
};
//Get information about importer state
var result = somClient.GetCubeImport(tGet);
return result;
}

See also:

GetCubeImport: Operation