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>S1!M!S!I1</id>
  </tCubeImport>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <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>S1!M!S!I1</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc isShortcut="0" isLink="0" fullUrl="/" 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>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
<execute>
  <state>Running</state>
  <extendedResult>1</extendedResult>
  </execute>
  <resultType>Cube</resultType>
  <loadDuplicates>0</loadDuplicates>
  </meta>
  </GetCubeImportResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

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

JSON response:

{
 "GetCubeImportResult" : 
  {
   "id" : 
    {
     "id" : "S1!M!S!I1"
    },
   "meta" : 
    {
     "obInst" : 
      {
       "obDesc" : 
        {
         "@fullUrl" : "\/",
         "@isShortcut" : "0",
         "@isLink" : "0",
         "@hf" : "0",
         "i" : "FORNEWCUBE",
         "n" : "For new cubes",
         "k" : "5881",
         "c" : "0",
         "p" : "5845",
         "h" : "0",
         "hasPrv" : "0",
         "isPermanent" : "1",
         "isTemp" : "0"
        }
      },
     "execute" : 
      {
       "state" : "Running",
       "extendedResult" : "1"
      },
     "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