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.
{
"SetCubeImport" :
{
"tCubeImport" :
{
"id" : "APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"execute" : "true"
},
"meta" :
{
"execute" :
{
"command" : "RunAsync",
"extendedResult" : "true"
}
}
}
}
}
{
"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: