H guys。 我正在爲SSIS開發一個自定義組件。處理輸入時出現問題。 問題在於「ProcessInput」方法不止一次執行。在這種情況下兩次。SSIS - PipelineComponent中的ProcessInput被多次調用
這是這個過程的輸入片段:
public override void ProcessInput(int inputID, PipelineBuffer buffer)
{
IDTSInput90 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);
if (input.InputColumnCollection.Count > 0)
{
while (buffer.NextRow())
{
try
{
for (int columnIndex = 0; columnIndex < input.InputColumnCollection.Count; columnIndex++)
{
ColumnInfo columnInfo = _columnInfos[input.InputColumnCollection[columnIndex].ID];
IDTSInputColumn90 inputColumn = input.InputColumnCollection[columnIndex];
try
{
//write to destination
}
catch (Exception writeEx)
{
throw new Exception("Couldn't write to destination");
}
}
}
catch (Exception ex)
{
throw ex;
}
}
}
else
{
throw new Exception("There is no columns in the input collection");
}
}
我不知道爲什麼它被稱爲兩次。 這是數據流:
Dataflow http://img371.imageshack.us/img371/3001/dataflowprocessinputrb6.png
這是映射窗口: Mapping window http://img78.imageshack.us/img78/3772/mappingprocessinputzs2.png