Starting Cube Import Execution

Below is the example of using the SetCubeImport operation to start data import to cube. The request contains data loader moniker and startup parameters: execution is asynchronous. The operation results in the returned moniker that enables the user to monitor import status. The example of checking execution status is given in the Getting Information about Cube Import Status section for the GetCubeImport operation.

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">
<SetCubeImport 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>
  </pattern>
<meta>
<execute>
  <command>RunAsync</command>
  <extendedResult>true</extendedResult>
  </execute>
  </meta>
  </tArg>
  </SetCubeImport>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetCubeImportResult 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>
  </SetCubeImportResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetCubeImport" :
{
"tCubeImport" :
{
"id" : "APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"execute" : "true"
},
"meta" :
{
"execute" :
{
"command" : "RunAsync",
"extendedResult" : "true"
}
}
}
}
}

JSON response:

{
"SetCubeImportResult" :
{
"id" :
{
"id" : "APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ"
}
}
}
public static SetCubeImportResult SetExecuteCubeImport(CubeImportId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetCubeImport()
{
tArg = new SetCubeImportArg()
{
meta = new CubeImportMd()
{
//Asynchronous mode of data import to cube
execute = new CubeImportExecute()
{
command = CubeImportExecuteCommand.RunAsync
}
},
pattern = new CubeImportMdPattern()
{
execute = true
}
},
tCubeImport = moniker
};
//Start import to cube
var result = somClient.SetCubeImport(tSet);
return result;
}

See also:

SetCubeImport: Operation