| 437-991-3573 | Data Engineering Services
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance

SSIS Flow Path based on VB Script & Precedence Constraint
by BF (Principal Consultant; Architecture; Engineering)

SSIS Control Flow w/ VB Script & Precedence Constraint

The VB Script will populate an SSIS Package Variable based on it's determination of the day of week it current is.
That value will determine the path to follow.
Variable varDayofWeek = 0 means it's Tuesday which if flow left. 1 means any other day of week which is flow right.
In this case, if the variable varDayofWeek=0(Tuesday), run a full data load. If varDayofWeek=1, run a diff data load.

VB Script

As stated above, based on the day of week, set the variable to reflect that.
Note: For the VB Script, may need to "Add Reference" to the Solution Project. Reference: "Microsoft.SQLServer.ManagedDTS"
Also, this reference may only be available, in "Add Reference"... ".NET" or "Browse", after the BIDS & Client Tools SDK are installed.
Ex: For SQL 2008:
C:\Program files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SQLServer.ManagedDTS.dll

Precedence Constraint Editor

Tooling Required:

Setup.exe for SQL Server 2008 R2 contains the install for BIDS.

The Data Flow engine determines order of execution when there are multiple Data Flows within one Data Flow Task. Therefore, when order is important, the package should use multiple Data Flow Tasks, each Task containing one Data Flow. You can then apply precedence constraints to control the execution order of the Tasks.