Database Reference
In-Depth Information
Open the solution created in the Business Intelligence Markup Language chapter. The
solution should be named “Biml2014.sln.” Add a new Biml file and rename it “Frame-
workSQLGen.biml.” Add a second new Biml file and rename it “i-Frame-
workSQLGen.biml.” I will use the i-FrameworkSQLGen.biml file to demonstrate para-
meterizing a Biml solution.
Add the following BimlScript to i-FrameworkSQLGen.biml, as shown in Listing
20-1 :
Listing 20-1 . Manually Adding SSIS Application Metadata to the Framework
<#
string applicationName = "Staging_Application";
string packageFolder = "I:\\Andy\\Projects\\BIML Demo\\";
string filename = @"G:\out\MyFile.sql";
string connectionString = "Data Source=(local);Initial
Catalog=SSISIncrementalLoad_Source;Provider=SQLNCLI11.1;Integrated
Security=SSPI;";
#>
The BimlScript shown in Listing 20-1 is a code fragment containing variable de-
clarations with initial values. The applicationName variable is a string that contains the
name of the SSIS Application I will be adding to the SSIS Framework. The pack-
ageFolder string contains the location of the SSIS packages I generated in the Business
Intelligence Markup Language chapter example code. The filename string variable
contains the full path to the SQL file that will be generated by the Frame-
workSQLGen.biml file. The connectionString variable contains connection information
to the source database used by this solution and the example in the Business Intelli-
gence Markup Language chapter.
Open the FrameworkSQLGen.biml file and add the code shown in Listing 20-2 :
Listing 20-2 . Starting the FrameworkSQLGen.biml File
<#@ template language="C#" tier="1" #>
<#@ include file="i-FrameworkSQLGen.biml" #>
<#@ import namespace="System.Data" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.IO" #>
<#@ import
 
 
 
 
Search WWH ::




Custom Search