More Related Content
Similar to Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL Server Days) (16)
More from Cathrine Wilhelmsen (20)
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL Server Days)
- 1. Don't Repeat Yourself -
Agile SSIS development with
Biml and BimlScript
Cathrine Wilhelmsen
SQL Server Days 2015
- 6. Your work day?
(Drag, drop, drag, drop, connect, drag, drop, connect,
resize, align, drag, drop, resize, connect, align…)
- 27. Biml files are placed in the Miscellaneous folder
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
- 28. Right-click on the Biml file to Generate SSIS Packages
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
- 42. Yes, but how does it actually work?
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<# foreach (var table in RootNode.Tables) { #>
<Package Name="Load<#=table.Name#>"></Package>
<# } #>
</Packages>
</Biml>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="LoadCustomer"></Package>
<Package Name="LoadProduct"></Package>
<Package Name="LoadSales"></Package>
</Packages>
</Biml>
- 52. <#@ property name="Table" type="AstTableNode" #>
<#=CallBimlScript("CommonCode.biml", Table)#>
Don't Repeat Yourself: CallBimlScript with parameters
- 59. <#+
public class HelperClass {
public static string HelperMethod(string InputParameter) {
return string.Concat("InputParameter: ", InputParameter);
}
}
#>
C# Classes and Methods
- 61. <#@ include file="HelperClass.biml" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<#=HelperClass.HelperMethod("Cats")#>
</Biml>
C# Classes and Methods: Included
<#+
public class HelperClass {
public static string HelperMethod(string InputParameter) {
return string.Concat("InputParameter: ", InputParameter);
}
}
#>
- 62. <#@ code file="..CodeHelperClass.cs" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<#=HelperClass.HelperMethod("Cats")#>
</Biml>
C# Classes and Methods: Mist / BimlStudio
using System.Data;
public class HelperClass {
public static string HelperMethod(string InputParameter) {
return string.Concat("InputParameter: ", InputParameter);
}
}
- 65. <#@ target type="Package" mergemode="LocalMerge" #>
<!–- <Node> = Target Type = <Package> -->
<Node>
<Variables>
<Variable Name="NewRows" DataType="Int32">0</Variable>
</Variables>
</Node>
Transformers syntax
- 66. <#@ target type="Package" mergemode="LocalMerge" #>
<!–- <Node> = Target Type = <Package> -->
<Node>
<Variables>
<Variable Name="NewRows" DataType="Int32">0</Variable>
</Variables>
</Node>
Transformers syntax: Target Type
- 67. <#@ target type="Package" mergemode="LocalMerge" #>
<!–- <Node> = Target Type = <Package> -->
<Node>
<Variables>
<Variable Name="NewRows" DataType="Int32">0</Variable>
</Variables>
</Node>
Transformers syntax: Merge Mode