0
votes

I am working on a console application which generates SSIS package. I have two data flow tasks which I need to connect in a certain order. How can the tasks be connected? I guess there must be something like a path between data flow task components such as

IDTSPath100 path = dataFlowTask.PathCollection.New();
path.AttachPathAndPropagateNotifications(component1.OutputCollection[0], component2.InputCollection[0])

Thanks in advance.

1
For programmatic generation of SSIS packages you may wish to look into BIML. - Nick.McDermaid
Unfortunately could not find answer to my question yet. - Karen Gumerov
Tasks are connected by Precedence Constraints. As to how to create them programmatically, I have no idea. - Tab Alleman

1 Answers

1
votes

You are looking for the package's PrecedenceConstraint collection and the Add method.

pkg.PrecedenceConstraints.Add(dftFrom, dftTo);

PrecedenceConstraints.Add Method