Below is the example of using the GetEtl operation to get information about the objects that are used to build data export/import chains in ETL task. The request contains moniker of opened ETL task instance and the pattern indicating whether information about the specified objects must be obtained. The response contains the obtained information.
{
"GetEtl" :
{
"tEtl" :
{
"id" : "S1!M!S!L1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"objects" : "Get",
"object" :
{
"settings" : "true"
}
}
}
}
}
{
"GetEtlResult" :
{
"id" :
{
"id" : "S1!M!S!L1"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "3",
"@hf" : "0",
"i" : "ETL_INDICATOR",
"n" : "ETL task for loading indicators",
"k" : "7012",
"c" : "4097",
"p" : "7011",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"objects" :
{
"its" :
{
"it" :
[
{
"k" : "0",
"id" : "PLAINDATAEXCELPROVIDEREX1",
"n" : "Import from Excel",
"vis" : "1",
"type" : "PlainDataExcelProviderEx",
"settings" :
{
"plainProvider" :
{
"provider" :
{
"props" :
{
"type" : "ExcelEx",
"excelEx" :
{
"stringDataFormat" :
{
"useSystem" : "1",
"dateFormat" : "DD.MM.YYYY",
"decimalSeparator" : ",",
"usePredefinedDateFormats" : "1"
},
"typeGuessRows" : "100",
"autoFillMode" : "DataRow",
"filterIf" : "",
"sheet" : "Sheet1",
"hasHeader" : "1",
"headerRow" : "0",
"format" : "xlsx",
"dataRow" : "0"
},
"srcFileName" : "D:\Work\Indicator.xls"
}
},
"fetchBlockSize" : "-1",
"ignoreIncorrectVals" : "0",
"unpivotMode" : "0",
"queryForFile" : "0"
}
}
},
{
"k" : "1",
"id" : "PLAINDATAMETABASECONSUMER1",
"n" : "Repository consumer",
"vis" : "1",
"type" : "PlainDataMetabaseConsumer",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "T_INDICATOR",
"n" : "Table",
"k" : "7013",
"c" : "769",
"p" : "7011",
"h" : "0",
"hasPrv" : "0",
"ic" : "0"
},
"read" : "1",
"write" : "1",
"settings" :
{
"plainConsumer" :
{
"consumer" :
{
"props" :
{
"type" : "Mb",
"mb" :
{
"dataset" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "T_INDICATOR",
"n" : "Table",
"k" : "7013",
"c" : "769",
"p" : "7011",
"h" : "0",
"hasPrv" : "0",
"ic" : "0"
}
}
}
},
"keyFieldNames" : "",
"clearConsumer" : "1",
"bulk" :
{
"commitCount" : "1024",
"actionOnProblem" : "DiscardRecordsInTransaction",
"saveInvalidRecs" : "0",
"invalidRecsFileName" : "",
"useStopLimit" : "0",
"stopLimit" : "1024",
"eventId" : ""
}
}
}
},
{
"k" : "2",
"id" : "PLAINDATACOPY1",
"n" : "Copy data",
"vis" : "1",
"type" : "PlainDataCopy",
"settings" :
{
"plainDataCopy" :
{
"provider" : "",
"consumer" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "T_INDICATOR",
"n" : "Table",
"k" : "7013",
"c" : "769",
"p" : "7011",
"h" : "0",
"hasPrv" : "0",
"ic" : "0"
},
"keyFieldNames" : ""
},
"clearConsumer" : "1",
"commitCount" : "1024",
"actionOnProblem" : "DiscardRecordsInTransaction"
}
}
}
]
}
},
"shapes" : ""
}
}
}
public static GetEtlResult GetETLInfo(EtlId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetEtl()
{
tArg = new GetEtlArg()
{
pattern = new EtlMdPattern()
{
objects = ListOperation.Get,
@object = new EtlObjectPattern()
{
settings = true
}
}
},
tEtl = moniker
};
//Get information about ETL task objects
var result = somClient.GetEtl(tGet);
return result;
}
See also: