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.