CreateEtlUnpivotResult CreateEtlUnpivot(EtlId tEtl, CreateEtlUnpivotArg tArg)
tEtl. Opened ETL task instance moniker.
tArg. Operation execution parameters.
The CreateEtlUnpivot operation creates data extraction settings in the crosstab mode.
To execute the operation, in the tEtl field specify moniker of opened ETL task instance, and in the tArg.id field specify identifier of the Excel source, for which settings are created. The source must be added to the task workspace. The unpivotMode field must be set to true in source settings. The moniker can be obtained after executing the OpenEtl operation.
The operation results in the new settings if the source has not been set up before, or the already determined settings if the source was set up to get data in the crosstab mode. Further work with the settings is executed using the GetEtlUnpivot/SetEtlUnpivot operations.
To close the settings and release resources, use the CloseEtlUnpivot operation.
Below is the example of creating data retrieval settings in the crosstab mode for the Excel source in ETL task. The request contains moniker of opened ETL task and source identifier. The response contains the new settings created for the source.
{
"CreateEtlUnpivot" :
{
"tEtl" :
{
"id" : "ENAIMHDOPOEIGOAEIKGJBOMLGNPEKPJEOIFKLAKCKCFCJHKN!M!S!LBCNODJDOPOEIGOAEAACBDDFIJKHDGKNEHKAKNNDFDEABINKC"
},
"tArg" :
{
"id" : "PLAINDATAEXCELPROVIDEREX1"
}
}
}
{
"CreateEtlUnpivotResult" :
{
"id" :
{
"id" : "ENAIMHDOPOEIGOAEIKGJBOMLGNPEKPJEOIFKLAKCKCFCJHKN!M!S!LBCNODJDOPOEIGOAEAACBDDFIJKHDGKNEHKAKNNDFDEABINKC"
},
"props" :
{
"stringDataFormat" :
{
"useSystem" : "1",
"dateFormat" : "DD.MM.YYYY",
"decimalSeparator" : ",",
"usePredefinedDateFormats" : "1"
},
"typeGuessRows" : "100",
"autoFillMode" : "Strings",
"filterIf" : "",
"leftBegin" : "0",
"leftEnd" : "0",
"headTop" : "0",
"headBottom" : "0",
"headColumn" : "-1",
"dataTop" : "1",
"dataWidth" : "1",
"dataRight" : "-1",
"dataBottom" : "-1",
"fixedCells" : "",
"fieldsNames" : "1",
"fieldNamesRow" : "-1",
"fieldNamesColumn" : "-1"
}
}
}
public static CreateEtlUnpivotResult CreateEtlUnpivot(string moniker, string sourceId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCreate = new CreateEtlUnpivot()
{
tArg = new CreateEtlUnpivotArg()
{
id = sourceId
},
tEtl = new EtlId() { id = moniker }
};
// Create data extraction settings in the crosstab mode
var result = somClient.CreateEtlUnpivot(tCreate);
return result;
}
See also: