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.
{
"GetCubeImport" :
{
"tCubeImport" :
{
"id" : "APJPBGEDEHLPFOAEJOPLMILHOOECMEPEOJKDMJHCGFMKDNKM!M!S!IDGLAIGEDEHLPFOAEPEOHNINBKMJBOEEEAINBLLIJNBNHEPDJ"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"execute" : "true",
"resultType" : "true",
"executeResult" :
{
"duplicates" :
{
"start" : "0"
},
"nulls" :
{
"start" : "0"
}
}
}
}
}
}
{
"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: