Database Reference
In-Depth Information
= 'F:\Andy\Projects\PublicFramework_PackageDeployment_2014\SSISConfig2014\'
declare @PackageName varchar(255) = 'Child1.dtsx'
Add to the stringbuilder Transact-SQL to declare the parameters that will be used
to insert SSIS package metadata into the Framework, omitting some and adding some,
as shown in Listing 20-6 :
Listing 20-6 . Adding SSIS Package Parameters to the Stringbuilder
sb.AppendLine("declare @ExecutionOrder int");
sb.AppendLine("declare @PackageID int");
sb.AppendLine("declare @PackageFolder varchar(255) = '"
+ packageFolder + "'");
sb.AppendLine("declare @PackageName varchar(255)");
sb.AppendLine();
sb.AppendLine("/* Add Packages */");
sb.AppendLine();
The real work of this BimlScript is done inside a loop, shown in Listing 20-7 :
Listing 20-7 . Starting the Loop to Load SSIS Framework Package Metadata
foreach (var table in tables)
{
string tbl = "IncrementalLoad_" + table.Name
+ ".dtsx";
The foreach loop definition creates a new variable named table that will represent
each Biml table in the tables collection populated earlier. The tbl string variable is cre-
ated for use identifying the SSIS package by name.
The remainder of Listings A-5 and A-9 in Appendix A are consolidated and shown
in Listing 20-8 :
Listing 20-8 . Adding SSIS Framework Package Metadata to the Stringbuilder
sb.AppendLine("/* " + tbl + " */");
sb.AppendLine();
sb.AppendLine("Set @PackageName = '" + tbl + "'");
 
 
 
 
 
 
Search WWH ::




Custom Search