0
votes

I am creating an SSIS package that will fetch data from tables in a sql database and store this data in datasets as package variables. A data flow task containing a flat file source will read data from a text file. This source component will feed my custom component which will access the dataset variables to deal with a few lookups and other manipulating. The custom component then creates sqlcommands for relevant insert statements. The issue that I am having, is that I am unsure of how to access these package variables from my custom pipeline component.

For further clarification:

The reason that I am creating a custom component is because the outputs of the source component will only be known at runtime as the flat file source will be changing and so will its columns. I then lookup a "mapping table" in a sql database to determine which flat file columns will map to fields in a table in the database.

I will be creating a script component which creates the data source and maps its outputs to the custom component. The custom component will use lookup data to create the necessary insert statement.

1
This is not a question, you will need to provide much more detail about your problem including examples if possible.Ciarán
Without more information I suspect you are vastly over complicating this. I would suggest that you stage the data in your database and do all your additional processing in Procedures or in SQL Scripts.Ciarán
While I tried to answer the specific question you asked in the post's title (SSIS: Accessing package variables and connections from within custom pipeline component), I think that you're going down the wrong path. Specifically, it sounds like you're trying to create component column mappings at package execution time - and, to the best of my knowledge, that can't be done.Edmund Schweppe

1 Answers

0
votes

Since your custom component will be inheriting from PipelineComponent, it will have access to the VariableDispenser property and the AcquireConnections and ReleaseConnections methods.