CreateEtlUnpivot

Syntax

CreateEtlUnpivotResult CreateEtlUnpivot(EtlId tEtl, CreateEtlUnpivotArg tArg)

Parameters

tEtl. Opened ETL task instance moniker.

tArg. Operation execution parameters.

Description

The CreateEtlUnpivot operation creates data extraction settings in the crosstab mode.

Comments

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.

Example

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.

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">
<CreateEtlUnpivot xmlns="http://www.fsight.ru/PP.SOM.Som">
<tEtl xmlns="">
  <id>ENAIMHDOPOEIGOAEIKGJBOMLGNPEKPJEOIFKLAKCKCFCJHKN!M!S!LBCNODJDOPOEIGOAEAACBDDFIJKHDGKNEHKAKNNDFDEABINKC</id>
  </tEtl>
<tArg xmlns="">
  <id>PLAINDATAEXCELPROVIDEREX1</id>
  </tArg>
  </CreateEtlUnpivot>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<CreateEtlUnpivotResult 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>ENAIMHDOPOEIGOAEIKGJBOMLGNPEKPJEOIFKLAKCKCFCJHKN!M!S!LBCNODJDOPOEIGOAEAACBDDFIJKHDGKNEHKAKNNDFDEABINKC</id>
  </id>
<props xmlns="">
<stringDataFormat>
  <useSystem>1</useSystem>
  <dateFormat>DD.MM.YYYY</dateFormat>
  <decimalSeparator>,</decimalSeparator>
  <usePredefinedDateFormats>1</usePredefinedDateFormats>
  </stringDataFormat>
  <typeGuessRows>100</typeGuessRows>
  <autoFillMode>Strings</autoFillMode>
  <filterIf />
  <leftBegin>0</leftBegin>
  <leftEnd>0</leftEnd>
  <headTop>0</headTop>
  <headBottom>0</headBottom>
  <headColumn>-1</headColumn>
  <dataTop>1</dataTop>
  <dataWidth>1</dataWidth>
  <dataRight>-1</dataRight>
  <dataBottom>-1</dataBottom>
  <fixedCells />
  <fieldsNames>1</fieldsNames>
  <fieldNamesRow>-1</fieldNamesRow>
  <fieldNamesColumn>-1</fieldNamesColumn>
  </props>
  </CreateEtlUnpivotResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CreateEtlUnpivot" :
{
"tEtl" :
{
"id" : "ENAIMHDOPOEIGOAEIKGJBOMLGNPEKPJEOIFKLAKCKCFCJHKN!M!S!LBCNODJDOPOEIGOAEAACBDDFIJKHDGKNEHKAKNNDFDEABINKC"
},
"tArg" :
{
"id" : "PLAINDATAEXCELPROVIDEREX1"
}
}
}

JSON response:

{
"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:

Working with ETL Task