SSIS Custom Component - two questions
Hi, I am relatively new to SSIS, but around 6 months ago I created a custom, asynchronous SSIS component. In this component, I had one input and one output and it works perfectly. What I am doing now is using this past project as a template for a new component that has 2 inputs and 3 outputs (again asynchronous). On this new project, I have defined all the input and output collections, as well as all the input and output columns, in addition to a few custom properties in the component. As I mentioned above, I am new to SSIS and really just bluffed my way through the first component, and I had a couple of questions regarding changes I may need to make when adding more inputs and outputs. (1) In my original project, I had only one PipelineBuffer defined. Do I need to define more PipelineBuffers - one for each input and/or output? (2) To try and test what I have done so far (without actually having any transformation code in the project) I have the following code (just to do nothing): public override void ProcessInput(int inputID, PipelineBuffer buffer) { while (buffer.NextRow()) { } if (buffer.EndOfRowset) { this.OutputBuffer.SetEndOfRowset(); } } private void OutputTables() { } When I build the solution and import the new component into my toolbox, all the inputs appear as I wish, but I cannot open the properties window at all i.e. when right-clicking the component I cannot see "edit" or "show advanced editor". Is there an obvious reason why this is? Thanks, Joern
January 19th, 2011 1:41am

To start - one of the best ways to answer a "how do I" question on custom components is to poke through someone else's code - and the best place to do that is the SSIS Community Tasks and Components site. But specifically... No - you won't have more than one "PipelineBuffer" class as given in the ProcessInput method. However, with two inputs defined, that "buffer" variable could be the buffer representing either of your inputs. Obviously, they could (and probably do) have different structures. You need to know which kind of buffer you're getting, and that's what the "inputID" value is for. It'll match the ID property of the IDTSInput100 or IDTSInput90 object of the input it represents. So depending on which input's buffer you get, you'll obviously retrieve elements out of it differently. Another side-effect of this which you may already have figured out is that you don't control which buffers you get from which inputs. You don't know if you'll get one buffer from one input, then the other, or if you'll get a hundred buffers from one input in a row before ever seeing a buffer from the second input. You have to handle caching yourself - because as soon as you call NextRow... that last row is gone. I'm not sure why you can't see a properties window or advanced editor... those should be "built" based on what I/O and properties your component has defined in the ProvideComponentProperties method. Compare to some other components at SSISCTC, and post yours here if you wish. It won't have an "edit" unless you create an editor class - again, check the samples for the interface class and editor class you need to create for a custom editor. Good luck! Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
January 19th, 2011 12:33pm

Firstly, thanks Todd for your response - it was very helpful. With regards to not being able to see the properties window or advanced editor, I found that removing the second input and the second output collections enables me to have access to the advanced editor. I am not sure why this is, but it must have something to do with my code which is as follows: ///// Input Collection IDTSInput100 input = ComponentMetaData.InputCollection.New(); input.Name = "Data Input 1"; input.ExternalMetadataColumnCollection.RemoveAll(); input.ExternalMetadataColumnCollection.IsUsed = false; // IDTSInput100 input2 = ComponentMetaData.InputCollection.New(); //input2.Name = "Data Input 2"; //input2.ExternalMetadataColumnCollection.RemoveAll(); //input2.ExternalMetadataColumnCollection.IsUsed = false; ///// Output Collection IDTSOutput100 Output = ComponentMetaData.OutputCollection.New(); Output.Name = "Data Output 1"; Output.Description = "Data Output Description 1"; Output.SynchronousInputID = 0; Output.ExternalMetadataColumnCollection.RemoveAll(); Output.ExternalMetadataColumnCollection.IsUsed = false; // IDTSOutput100 Output2 = ComponentMetaData.OutputCollection.New(); // Output2.Name = "Data Output 2"; // Output2.Description = "Data Output Description 2"; // Output2.SynchronousInputID = 0; // Output2.ExternalMetadataColumnCollection.RemoveAll(); // Output2.ExternalMetadataColumnCollection.IsUsed = false; Is there any obvious reason as to why the inclusion of the 2nd input and 2nd output would cause the advanced editor from not appearing when I've built the component?
January 19th, 2011 9:21pm

Firstly, thanks Todd for your response - it was very helpful. With regards to not being able to see the properties window or advanced editor, I found that removing the second input and the second output collections enables me to have access to the advanced editor. I am not sure why this is, but it must have something to do with my code which is as follows: ///// Input Collection IDTSInput100 input = ComponentMetaData.InputCollection.New(); input.Name = "Data Input 1"; input.ExternalMetadataColumnCollection.RemoveAll(); input.ExternalMetadataColumnCollection.IsUsed = false; // IDTSInput100 input2 = ComponentMetaData.InputCollection.New(); //input2.Name = "Data Input 2"; //input2.ExternalMetadataColumnCollection.RemoveAll(); //input2.ExternalMetadataColumnCollection.IsUsed = false; ///// Output Collection IDTSOutput100 Output = ComponentMetaData.OutputCollection.New(); Output.Name = "Data Output 1"; Output.Description = "Data Output Description 1"; Output.SynchronousInputID = 0; Output.ExternalMetadataColumnCollection.RemoveAll(); Output.ExternalMetadataColumnCollection.IsUsed = false; // IDTSOutput100 Output2 = ComponentMetaData.OutputCollection.New(); // Output2.Name = "Data Output 2"; // Output2.Description = "Data Output Description 2"; // Output2.SynchronousInputID = 0; // Output2.ExternalMetadataColumnCollection.RemoveAll(); // Output2.ExternalMetadataColumnCollection.IsUsed = false; Is there any obvious reason as to why the inclusion of the 2nd input and 2nd output would cause the advanced editor from not appearing when I've built the component? I had googled this issue and found this here: http://www.mombu.com/microsoft/sql-server-dts/t-ssis-no-advanced-editor-if-more-than-one-input-1074431.html which describes the same problem I am having, but with no solution.
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2011 1:58am

I think the issue is the multiple inputs. The standard data flow component editor cannot handle more than one input. Therefore you have to create your own custom editor for your component.SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
January 20th, 2011 6:45pm

Thank you CozyRoc and thank-you Todd. I'll look into creating a custom editor, and thanks Todd for your explanation of the buffers.
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2011 11:30pm

Thank you CozyRoc and thank-you Todd. I'll look into creating a custom editor, and thanks Todd for your explanation of the buffers.
January 20th, 2011 11:30pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics