Monday, March 26, 2012

Error OutPut in Custom Source Component

For the Custome source Component ErrorOutput, should I go for asynchronous / synchronous Output.

If i go for synchronous output

// Create the error output.
IDTSOutput90 errorOutput = ComponentMetaData.OutputCollection.New();
errorOutput.IsErrorOut = true;
errorOutput.Name = "ErrorOutput";
errorOutput.SynchronousInputID = What Id is required here;
errorOutput.ExclusionGroup = 1;

Is it the IDTSOutput90 InPut.ID / OutPut.ID which should be assigned.

Thanks Regards

Anil

The SynchronousInputID is the ID for which the output is synchronous with, so this would be the input ID. If you write an asynchronous component then obviously you do not need to set it.|||

Hi Darren

Since I am developing a Source component I will not have any InPut.ID ?

|||

Correct, by their nature source components are asynchronous, in fact they have no inputs at all. There is no input buffer, so they must create a new output buffer which is really the definition on an asynchronous component, one that does not share the same buffer between input and output.

See Books Online "Developing a Custom Source Component "

Also take look at Books Online for the "Using Error Outputs" topic, in particular "Redirecting a Row with Asynchronous Outputs"

|||

I had a look at the Books Online "Using Error Outputs" for Asynchronous, I have add all the code thats given in there.

The Error OUT & ERROR COLUMNS ErrorColum, ErrorCode are Getting Created,

In addation to that All columns in OUTPUT should also be created Under ERROR OUT. which is not hapenning. That whould mean that I need to create error output columns, In the similar manner as we create the OutPut Columns.

Any Idea as to how to create the error output columns.

|||

Yes. In a transform or destination I would override SetUsageType to do this, add both columns at the same time., For a source you can use MapOutputColumn.

Edit - Strike, that use InsertOutputColumnAt instead.

No comments:

Post a Comment