When to use ProcessInput or PrimeOutput in your Component

by Allan Mitchell 22 Nov 2004 14:00

When building our own custom pipeline components two methods in particular are very important and it may become a little confusing as to which one is used in which situation.

The two methods are:

  • ProcessInput
  • PrimeOutput

Depending on the type of component you are building will depend on whether you need to use one or both of these methods. Let's take a look now and identify how to use them correctly.

All components need to have the DtsPipelineComponent attribute, and in particular the ComponentType property. As we detail each type of component we will tell you what to put in there.

Adapters

Source and destination adapters are examples of asynchronous components, but classified separately due to their unique functionality, and ComponentType property requirements.

Source Adapter

A source adapter has no inputs and one or more outputs.

  • ProcessInput -This method is not called
  • PrimeOutput - Everything to do with the data is done in here.

For a source adapter you are required to set the ComponentType property to ComponentType.SourceAdapter.

Destination Adapter

A destination adapter has no outputs and one or more inputs.

  • ProcessInput - All the work is done in this method to handle the incoming data.
  • PrimeOutput - This method is not called.

For a destination adapter you are required to set the ComponentType property to ComponentType.DestinationAdapter.

Transforms

The two types of transformations covered below both use the ComponentType property set to ComponentType.Transform.

Synchronous Transform

A synchronous transform has one or more inputs and one or more outputs. The input buffer is reused by the output. LineageIDs remain unchanged

  • ProcessInput - All the work is done here to handle the data both being received and being passed out of the component.
  • PrimeOutput - This method is not called.

Asynchronous Transform

An asynchronous transform has one or more inputs and one or more outputs. A new buffer is created by the component to be used by the output.

  • ProcessInput - This method is used to handle the data being received by the component. It is then passed to the output buffer(s)
  • PrimeOutput - This method is used to pass the data from the component to anything downstream.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading