SlideShare ist ein Scribd-Unternehmen logo
1 von 133
Downloaden Sie, um offline zu lesen
Level Up Your Biml:
Best Practices and Coding Techniques
Cathrine Wilhelmsen
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Session Description
Is your Biml solution starting to remind you of a bowl of tangled spaghetti code?
Good! That means you are solving real problems while saving a lot of time. The
next step is to make sure that your solution does not grow too complex and
confusing – you do not want to waste all that saved time on future maintenance!
Attend this session for an overview of Biml best practices and coding techniques.
Learn how to centralize and reuse code with Include files and the CallBimlScript
method. Make your code easier to read and write by utilizing LINQ (Language-
Integrated Queries). Share code between files by using Annotations and
ObjectTags. And finally, if standard Biml is not enough to solve your problems, you
can create your own C# helper classes and extension methods to implement
custom logic.
Start improving your code today and level up your Biml in no time!
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Cathrine Wilhelmsen
@cathrinew
cathrinew.net
Data Warehouse Architect
Business Intelligence Developer
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
You…
…?
Know basic Biml and BimlScript
Completed BimlScript.com lessons
Created a staging environment
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Code Management
…the next 75 minutes…
C# Classes and MethodsPractical Biml Coding
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml and
BimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml vs. BimlScript
Generate, control and
manipulate Biml with C#
XML Language
"Just plain text"
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml
Biml is an XML language – it's just plain text
Easy to read and write – but can be verbose
You probably don't want to write 50000 lines of
Biml code manually...?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Generating Biml
You can use any tool to generate Biml for you:
• Text editor macros
• Excel
• PowerShell
• T-SQL
…but the recommended tool is BimlScript :)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
What is BimlScript?
Extend Biml with C# or VB code blocks
Import database structure and metadata
Loop over tables and columns
Expressions replace static values
Allows you to generate, control and manipulate Biml code
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlScript Code Nuggets
<# … #> Control Nuggets (Control logic)
<#= … #> Text Nuggets (Returns string)
<#@ … #> Directives (Compiler instructions)
<#+ … #> Class Nuggets (Create C# classes)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlScript Syntax
<# var con = SchemaManager.CreateConnectionNode(...); #>
<# var metadata = con.GetDatabaseSchema(); #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<# foreach (var table in metadata.TableNodes) { #>
<Package Name="Load_<#=table.Name#>"></Package>
<# } #>
</Packages>
</Biml>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlScript Syntax: Import metadata
<# var con = SchemaManager.CreateConnectionNode(...); #>
<# var metadata = con.GetDatabaseSchema(); #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<# foreach (var table in metadata.TableNodes) { #>
<Package Name="Load_<#=table.Name#>"></Package>
<# } #>
</Packages>
</Biml>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlScript Syntax: Loop over tables
<# var con = SchemaManager.CreateConnectionNode(...); #>
<# var metadata = con.GetDatabaseSchema(); #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<# foreach (var table in metadata.TableNodes) { #>
<Package Name="Load_<#=table.Name#>"></Package>
<# } #>
</Packages>
</Biml>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlScript Syntax: Replace static values
<# var con = SchemaManager.CreateConnectionNode(...); #>
<# var metadata = con.GetDatabaseSchema(); #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<# foreach (var table in metadata.TableNodes) { #>
<Package Name="Load_<#=table.Name#>"></Package>
<# } #>
</Packages>
</Biml>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How does it work?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Yes, but how does it work?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Yes, but how does it actually work?
<# foreach (var table in metadata.TableNodes) { #>
<Package Name="Load_<#=table.Name#>"></Package>
<# } #>
<Package Name="Load_Customer"></Package>
<Package Name="Load_Product"></Package>
<Package Name="Load_Sales"></Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml Tools
Comparison
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
What do you need?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlExpress
Free add-in for Visual Studio
Code editor with syntax highlighting and Biml Intellisense
More frequent updates than BIDS Helper
varigence.com/bimlexpress
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlOnline
Free browser-based Biml editor
Code editor with Biml and C# Intellisense
Reverse-engineer from SSIS to Biml
bimlonline.com
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
BimlStudio
Licensed full-featured development environment for Biml
Visual designer and metadata modeling
Full-stack automation and transformers
varigence.com/bimlstudio
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml Tools Comparison
Free
Biml Intellisense
Preview BimlScript
Free
Full Intellisense
Logical View
Licensed
Full IDE
SSAS+++
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Code
Management
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Don't Repeat Yourself
Move common code to separate files
Centralize and reuse in many projects
Update code once for all projects
1. Tiered Biml Files
2. Include Files
3. CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files
Split Biml code in multiple files to:
• Solve logical dependencies
• Build solutions in multiple steps behind the scenes
Specify the tier per file by using the template directive:
<#@ template tier="2" #>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files
Biml is compiled step-by-step from lowest to highest tier
• Biml files are implicitly tier 0
• BimlScript files are implicitly tier 1
In each tier, objects are added to the in-memory RootNode
Higher tiers can use objects from lower tiers
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
What is this RootNode?
When working with Biml, the
<Biml> root element contains
collections of elements:
When working with BimlScript,
the RootNode object contains
collections of objects:
<Biml>
<Connections>...</Connections>
<Databases>...</Databases>
<Schemas>...</Schemas>
<Tables>...</Tables>
<Projects>...</Projects>
<Packages>...</Packages>
</Biml>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Tiered Biml Files: Behind the Scenes
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How do you use Tiered Biml Files?
1. Create Biml files with specified tiers
2. Select all the tiered Biml files
3. Right-click and click Generate SSIS Packages
1
2
3
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Include Files
Include common code in multiple files and projects
Can include many file types: .biml .txt .sql .cs
Use the include directive
<#@ include file="CommonCode.biml" #>
The directive will be replaced by the included file
Works like an automated Copy & Paste
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Global Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Global Include Files
Use the global directive
<#@ global #>
Use instead of adding include directive to all files to
• Create global variables
• Include code files
• Make VB default language
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Global Include Files
Specify directive attributes to control global include files
<#@ global
order="1"
location="top"
active="true"
applytocallbimlscript="false" #>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Global Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Global Include Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How do you use Global Include Files?
1. Create Global Include File
2. Select Biml files and Global Include File
3. Right-click and click Generate SSIS Packages
1
2
3
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Works like a parameterized include (or stored procedure)
File to be called (callee) specifies accepted parameters:
<#@ property name="Parameter" type="String" #>
File that calls (caller) passes parameters:
<#=CallBimlScript("Common.biml", Parameter)#>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScript
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
Callee specifies custom output object:
<# CustomOutput.BimlComment = "Comment"; #>
Caller defines, passes and uses output object:
<# dynamic outObj; #>
<#=CallBimlScriptWithOutput("CommonCode.biml",
out outObj)#>
<#=outObj.BimlComment#>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
CallBimlScriptWithOutput
use CustomOutput
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How does this actually work?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Passing code
between files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Annotations and ObjectTags
Annotations and ObjectTags are Key / Value pairs
Use them to pass code between Biml files
Annotations: String / String
ObjectTags: String / Object
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Annotations
Create annotations:
<OleDbConnection Name="Destination" ConnectionString="…">
<Annotations>
<Annotation Tag="Schema">AW2014</Annotation>
</Annotations>
</OleDbConnection>
Use annotations:
RootNode.OleDbConnections["Destination"].GetTag("Schema");
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
ObjectTags
Create ObjectTags:
RootNode.OleDbConnections["Destination"].ObjectTag["Filter"]
= new List<string>{"Product","ProductCategory"};
Use ObjectTags:
RootNode.OleDbConnections["Destination"].ObjectTag["Filter"];
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ (Language-Integrated Query)
One language to query:
SQL Server Databases
Datasets
Collections
Two ways to write queries:
SQL-ish Syntax
Extension Methods
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ Extension Methods
Sort
OrderBy, ThenBy
Filter
Where, OfType
Group
GroupBy
Aggregate
Count, Sum
Check Collections
All, Any, Contains
Get Elements
First, Last, ElementAt
Project Collections
Select, SelectMany
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ Extension Methods Example
var numConnections = RootNode.Connections.Count()
foreach (var table in RootNode.Tables.Where(…))
if (RootNode.Packages.Any(…))
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ Extension Methods Example
foreach (var table in RootNode.Tables.Where(…))
if (RootNode.Packages.Any(…))
But what do you put in here?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Lambda Expressions
"A lambda expression is an anonymous
function that you can use to create
delegates or expression tree types"
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Lambda Expressions
…huh? o_O
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Lambda Expressions
table => table.Name == "Product"
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Lambda Expressions
table => table.Name == "Product"
The arrow is the lambda operator
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Lambda Expressions
table => table.Name == "Product"
Input parameter is on the left side
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Lambda Expressions
table => table.Name == "Product"
Expression is on the right side
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ and Lambda
Chain LINQ Methods and use Lambda Expressions
for simple and powerful querying of collections:
.Where(table => table.Schema.Name == "Production")
.OrderBy(table => table.Name)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Filter collections
Where()
Returns the filtered collection with all elements that meet the criteria
RootNode.Tables.Where(t => t.Schema.Name == "Production")
OfType()
Returns the filtered collection with all elements of the specified type
RootNode.Connections.OfType<AstExcelOleDbConnectionNode>()
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Sort collections
OrderBy()
Returns the collection sorted by key…
RootNode.Tables.OrderBy(t => t.Name)
ThenBy()
…then sorted by secondary key
RootNode.Tables.OrderBy(t => t.Schema.Name)
.ThenBy(t => t.Name)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Sort collections
OrderByDescending()
Returns the collection sorted by key…
RootNode.Tables.OrderByDescending(t => t.Name)
ThenByDescending()
…then sorted by secondary key
RootNode.Tables.OrderBy(t => t.Schema.Name)
.ThenByDescending(t => t.Name)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Sort collections
Reverse()
Returns the collection sorted in reverse order
RootNode.Tables.Reverse()
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Group collections
GroupBy()
Returns a collection of key-value pairs where each value is a new collection
RootNode.Tables.GroupBy(t => t.Schema.Name)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Aggregate collections
Count()
Returns the number of elements in the collection
RootNode.Tables.Count()
RootNode.Tables.Count(t => t.Schema.Name == "Production")
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Aggregate collections
Sum()
Returns the sum of the (numeric) values in the collection
RootNode.Tables.Sum(t => t.Columns.Count)
Average()
Returns the average value of the (numeric) values in the collection
RootNode.Tables.Average(t => t.Columns.Count)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Aggregate collections
Min()
Returns the minimum value of the (numeric) values in the collection
RootNode.Tables.Min(t => t.Columns.Count)
Max()
Returns the maximum value of the (numeric) values in the collection
RootNode.Tables.Max(t => t.Columns.Count)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Check collections
All()
Returns true if all elements in the collection meet the criteria
RootNode.Databases.All(d => d.Name.StartsWith("A"))
Any()
Returns true if any element in the collection meets the criteria
RootNode.Databases.Any(d => d.Name.Contains("DW"))
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Check collections
Contains()
Returns true if collection contains element
RootNode.Databases.Contains(AdventureWorks2014)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Get elements
First()
Returns the first element in the collection (that meets the criteria)
RootNode.Tables.First()
RootNode.Tables.First(t => t.Schema.Name == "Production")
FirstOrDefault()
Returns the first element in the collection or default value (that meets the criteria)
RootNode.Tables.FirstOrDefault()
RootNode.Tables.FirstOrDefault(t => t.Schema.Name == "Production")
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Get elements
Last()
Returns the last element in the collection (that meets the criteria)
RootNode.Tables.Last()
RootNode.Tables.Last(t => t.Schema.Name == "Production")
LastOrDefault()
Returns the last element in the collection or default value (that meets the criteria)
RootNode.Tables.LastOrDefault()
RootNode.Tables.LastOrDefault(t => t.Schema.Name == "Production")
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Get elements
ElementAt()
Returns the element in the collection at the specified index
RootNode.Tables.ElementAt(42)
ElementAtOrDefault()
Returns the element in the collection or default value at the specified index
RootNode.Tables.ElementAtOrDefault(42)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Project collections
Select()
Creates a new collection from one collection
A list of table names:
RootNode.Tables.Select(t => t.Name)
A list of table and schema names:
RootNode.Tables.Select(t => new {t.Name, t.Schema.Name})
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
LINQ: Project collections
SelectMany()
Creates a new collection from many collections and merges the collections
A list of all columns from all tables:
RootNode.Tables.SelectMany(t => t.Columns)
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Error Handling
and Debugging
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Error Handling
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml Validation
Biml has built-in ValidationReporter
Create custom warnings and errors
Especially useful in teams
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml Validation: ValidationReporter
Build will succeed on Warning
<# ValidationReporter.Report(Severity.Warning, "Oops!"); #>
Build will fail on Error, but not immediately
<# ValidationReporter.Report(Severity.Error,"Uh-oh!"); #>
Build will immediately fail on Fatal Error
<# ValidationReporter.Report(Severity.Fatal, "PANIC!"); #>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Debugging
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml Debugging
Include DebugUtilities.cs in your project
Reference code file
<#@ code file="DebugUtilities.cs" #>
Get all property values on Biml objects
<#=table.GetAllPropertyValues()#>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How do you debug Biml?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Classes
and Methods
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
C# Classes and Methods
BimlScript and LINQ not enough?
Need to reuse C# code?
Create your own classes and methods!
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
C# Classes and Methods
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "");
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
C# Classes and Methods: Class
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "");
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
C# Classes and Methods: Method
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "");
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
C# Classes and Methods: Logic
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "");
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Where do you put your C# code?
Inline Code Blocks
<#+ ... #>
Included Biml Files with Code Blocks
<#@ include file="CodeBlock.biml" #>
Code Files
<#@ code file="Code.cs" #>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Inline Code Blocks
<#+ ... #>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Inline Code Blocks
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables) { #>
<# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
<#+
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
#>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Included Biml Files with Code Blocks
<#+ ... #>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Included Biml Files with Code Blocks
<#@ include file="HelperClass.biml" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables) { #>
<# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
<#+
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
#>
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Code Files
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Code Files
<#@ code file="HelperClass.cs" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables) { #>
<# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How do you create C# classes
and methods?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Extension
Methods
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Extension Methods
"Make it look like the method belongs to
an object instead of a helper class"
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Extension Methods: From this…
<#@ code file="HelperClass.cs" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables) { #>
<# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
public static class HelperClass {
public static bool AnnotationTagExists(AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Extension Methods: …to this
<#@ code file="HelperClass.cs" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables) { #>
<# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
public static class HelperClass {
public static bool AnnotationTagExists(this AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Extension Methods: …to this
<#@ code file="HelperClass.cs" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables) { #>
<# if (table.AnnotationTagExists("SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
public static class HelperClass {
public static bool AnnotationTagExists(this AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Extension Methods: …to this :)
<#@ code file="HelperClass.cs" #>
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<# foreach (var table in RootNode.Tables.Where(t =>
t.AnnotationTagExists("SourceSchema")) { #>
...
<# } #>
<# } #>
</Biml>
public static class HelperClass {
public static bool AnnotationTagExists(this AstNode node, string tag) {
return (node.GetTag(tag) != "") ? true : false;
}
}
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
How do you create C#
extension methods?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Code Management
…the past 75 minutes…
C# Classes and MethodsPractical Biml Coding
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Where can you learn more?
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Get things done
Start small
Start simple
Start with ugly code
Keep going
Expand
Improve
Deliver often
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
Biml on Monday…
…BimlBreak the rest of the week ☺
Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
@cathrinew
cathrinew.net
linkedin.com/in/cathrinewilhelmsen
hi@cathrinew.net
slideshare.net/cathrinewilhelmsen
Biml resources and references:
cathrinew.net/biml

Weitere ähnliche Inhalte

Was ist angesagt?

Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...Cathrine Wilhelmsen
 
Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...
Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...
Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )
Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )
Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )Cathrine Wilhelmsen
 
Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)
Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)
Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQLBits XV)
Biml for Beginners: Speed up your SSIS development (SQLBits XV)Biml for Beginners: Speed up your SSIS development (SQLBits XV)
Biml for Beginners: Speed up your SSIS development (SQLBits XV)Cathrine Wilhelmsen
 
Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)Cathrine Wilhelmsen
 
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...
Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...
Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...Cathrine Wilhelmsen
 
S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...
S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...
S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)Cathrine Wilhelmsen
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)Cathrine Wilhelmsen
 
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...Cathrine Wilhelmsen
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Cathrine Wilhelmsen
 
Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)
Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)
Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)Cathrine Wilhelmsen
 

Was ist angesagt? (20)

Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Ex...
 
Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...
Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...
Generate SSIS packages automatically with Biml and BimlScript (SQLKonferenz 2...
 
Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )
Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )
Biml for Beginners: Speed up your SSIS development (SQL PASS Edmonton )
 
Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)
Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)
Level Up Your Biml: Best Practices and Coding Techniques (TUGA IT 2016)
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Iceland)
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Tallinn)
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)
 
Biml for Beginners: Speed up your SSIS development (SQLBits XV)
Biml for Beginners: Speed up your SSIS development (SQLBits XV)Biml for Beginners: Speed up your SSIS development (SQLBits XV)
Biml for Beginners: Speed up your SSIS development (SQLBits XV)
 
Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLBits 2018)
 
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...
Don't Repeat Yourself - Agile SSIS Development with Biml and BimlScript (SQL ...
 
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Chicago)
 
Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...
Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...
Biml for Beginners: Script and Automate SSIS development (Capital Area SQL Se...
 
S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...
S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...
S.M.A.R.T. Biml - Standardize, Model, Automate, Reuse and Transform (SQLSatur...
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Chicago)
 
Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)
Biml for Beginners: Speed up your SSIS development (SQLSaturday Nashville)
 
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...
Biml for Beginners - Generating SSIS Packages with BimlScript (SQLSaturday Go...
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
 
Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)
Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)
Tools and Tips For Data Warehouse Developers (SQLSaturday Slovenia)
 
Azure and Umbraco CMS
Azure and Umbraco CMSAzure and Umbraco CMS
Azure and Umbraco CMS
 
Managed WordPress Demystified
Managed WordPress DemystifiedManaged WordPress Demystified
Managed WordPress Demystified
 

Ähnlich wie Level Up Your Biml: Best Practices and Coding Techniques (SQLSaturday Denver)

Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)
Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)
Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...
Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...
Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...
Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...
Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (Hybrid VC)
Biml for Beginners: Script and Automate SSIS development (Hybrid VC)Biml for Beginners: Script and Automate SSIS development (Hybrid VC)
Biml for Beginners: Script and Automate SSIS development (Hybrid VC)Cathrine Wilhelmsen
 
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)Cathrine Wilhelmsen
 
Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)Cathrine Wilhelmsen
 
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)Cathrine Wilhelmsen
 
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)Cathrine Wilhelmsen
 
HTML+CSS: how to get started
HTML+CSS: how to get startedHTML+CSS: how to get started
HTML+CSS: how to get startedDimitris Tsironis
 
Conquering Code with hjc
Conquering Code with hjcConquering Code with hjc
Conquering Code with hjchjc
 
Architectures and Alternatives
Architectures and AlternativesArchitectures and Alternatives
Architectures and AlternativesEberhard Wolff
 
CI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on Databricks
CI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on DatabricksCI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on Databricks
CI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on DatabricksDatabricks
 
Document Automation with Power Automate
Document Automation with Power AutomateDocument Automation with Power Automate
Document Automation with Power AutomateWyngate Solutions
 
Custom Remote Desktop service by Techinline
Custom Remote Desktop service by TechinlineCustom Remote Desktop service by Techinline
Custom Remote Desktop service by TechinlineAndrey Dankevich
 

Ähnlich wie Level Up Your Biml: Best Practices and Coding Techniques (SQLSaturday Denver) (16)

Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)
Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)
Level Up Your Biml: Best Practices and Coding Techniques (PASS Summit 2018)
 
Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...
Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...
Biml for Beginners: Script and Automate SSIS development (Malibu SQL Server U...
 
Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...
Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...
Biml for Beginners: Script and Automate SSIS development (24 Hours of PASS: S...
 
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Oslo)
 
Biml for Beginners: Script and Automate SSIS development (Hybrid VC)
Biml for Beginners: Script and Automate SSIS development (Hybrid VC)Biml for Beginners: Script and Automate SSIS development (Hybrid VC)
Biml for Beginners: Script and Automate SSIS development (Hybrid VC)
 
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)
Biml for Beginners: Script and Automate SSIS development (SQLSaturday Finland)
 
Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)
Level Up Your Biml: Best Practices and Coding Techniques (SQLDay 2018)
 
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLGrillen 2018)
 
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)
Biml Tips and Tricks: Not Just for SSIS Packages! (SQLBits 2019)
 
HTML+CSS: how to get started
HTML+CSS: how to get startedHTML+CSS: how to get started
HTML+CSS: how to get started
 
Conquering Code with hjc
Conquering Code with hjcConquering Code with hjc
Conquering Code with hjc
 
Email dssign rules
Email dssign rulesEmail dssign rules
Email dssign rules
 
Architectures and Alternatives
Architectures and AlternativesArchitectures and Alternatives
Architectures and Alternatives
 
CI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on Databricks
CI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on DatabricksCI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on Databricks
CI/CD Templates: Continuous Delivery of ML-Enabled Data Pipelines on Databricks
 
Document Automation with Power Automate
Document Automation with Power AutomateDocument Automation with Power Automate
Document Automation with Power Automate
 
Custom Remote Desktop service by Techinline
Custom Remote Desktop service by TechinlineCustom Remote Desktop service by Techinline
Custom Remote Desktop service by Techinline
 

Mehr von Cathrine Wilhelmsen

Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...
Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...
Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...Cathrine Wilhelmsen
 
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Cathrine Wilhelmsen
 
Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)
Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)
Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)Cathrine Wilhelmsen
 
Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...
Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...
Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...Cathrine Wilhelmsen
 
Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)
Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)
Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)Cathrine Wilhelmsen
 
Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)
Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)
Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)Cathrine Wilhelmsen
 
The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)
The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)
The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)Cathrine Wilhelmsen
 
Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...
Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...
Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...Cathrine Wilhelmsen
 
Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...
Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...
Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...Cathrine Wilhelmsen
 
Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)
Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)
Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)Cathrine Wilhelmsen
 
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Cathrine Wilhelmsen
 
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...Cathrine Wilhelmsen
 
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...Cathrine Wilhelmsen
 
"I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ...
"I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ..."I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ...
"I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ...Cathrine Wilhelmsen
 
Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...
Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...
Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...Cathrine Wilhelmsen
 
6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)
6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)
6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)Cathrine Wilhelmsen
 
Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...
Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...
Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...Cathrine Wilhelmsen
 
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...Cathrine Wilhelmsen
 
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...Cathrine Wilhelmsen
 

Mehr von Cathrine Wilhelmsen (20)

Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...
Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...
Getting Started: Data Factory in Microsoft Fabric (Microsoft Fabric Community...
 
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
 
Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)
Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)
Website Analytics in My Pocket using Microsoft Fabric (SQLBits 2024)
 
Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...
Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...
Data Integration using Data Factory in Microsoft Fabric (ESPC Microsoft Fabri...
 
Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)
Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)
Choosing between Fabric, Synapse and Databricks (Data Left Unattended 2023)
 
Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)
Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)
Data Integration with Data Factory (Microsoft Fabric Day Oslo 2023)
 
The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)
The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)
The Battle of the Data Transformation Tools (PASS Data Community Summit 2023)
 
Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...
Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...
Visually Transform Data in Azure Data Factory or Azure Synapse Analytics (PAS...
 
Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...
Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...
Building an End-to-End Solution in Microsoft Fabric: From Dataverse to Power ...
 
Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)
Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)
Website Analytics in my Pocket using Microsoft Fabric (AdaCon 2023)
 
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
 
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (D...
 
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...
Stressed, Depressed, or Burned Out? The Warning Signs You Shouldn't Ignore (S...
 
"I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ...
"I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ..."I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ...
"I can't keep up!" - Turning Discomfort into Personal Growth in a Fast-Paced ...
 
Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...
Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...
Lessons Learned: Implementing Azure Synapse Analytics in a Rapidly-Changing S...
 
6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)
6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)
6 Tips for Building Confidence as a Public Speaker (SQLBits 2022)
 
Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...
Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...
Lessons Learned: Understanding Pipeline Pricing in Azure Data Factory and Azu...
 
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
 
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
Pipelines and Data Flows: Introduction to Data Integration in Azure Synapse A...
 

Kürzlich hochgeladen

Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in collegessuser7a7cd61
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.pptamreenkhanum0307
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 

Kürzlich hochgeladen (20)

Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in college
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.ppt
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 

Level Up Your Biml: Best Practices and Coding Techniques (SQLSaturday Denver)

  • 1. Level Up Your Biml: Best Practices and Coding Techniques Cathrine Wilhelmsen
  • 2. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Session Description Is your Biml solution starting to remind you of a bowl of tangled spaghetti code? Good! That means you are solving real problems while saving a lot of time. The next step is to make sure that your solution does not grow too complex and confusing – you do not want to waste all that saved time on future maintenance! Attend this session for an overview of Biml best practices and coding techniques. Learn how to centralize and reuse code with Include files and the CallBimlScript method. Make your code easier to read and write by utilizing LINQ (Language- Integrated Queries). Share code between files by using Annotations and ObjectTags. And finally, if standard Biml is not enough to solve your problems, you can create your own C# helper classes and extension methods to implement custom logic. Start improving your code today and level up your Biml in no time!
  • 3. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Cathrine Wilhelmsen @cathrinew cathrinew.net Data Warehouse Architect Business Intelligence Developer
  • 4. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net You… …? Know basic Biml and BimlScript Completed BimlScript.com lessons Created a staging environment
  • 5. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Code Management …the next 75 minutes… C# Classes and MethodsPractical Biml Coding
  • 6. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml and BimlScript
  • 7. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml vs. BimlScript Generate, control and manipulate Biml with C# XML Language "Just plain text"
  • 8. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml Biml is an XML language – it's just plain text Easy to read and write – but can be verbose You probably don't want to write 50000 lines of Biml code manually...?
  • 9. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Generating Biml You can use any tool to generate Biml for you: • Text editor macros • Excel • PowerShell • T-SQL …but the recommended tool is BimlScript :)
  • 10. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net What is BimlScript? Extend Biml with C# or VB code blocks Import database structure and metadata Loop over tables and columns Expressions replace static values Allows you to generate, control and manipulate Biml code
  • 11. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlScript Code Nuggets <# … #> Control Nuggets (Control logic) <#= … #> Text Nuggets (Returns string) <#@ … #> Directives (Compiler instructions) <#+ … #> Class Nuggets (Create C# classes)
  • 12. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlScript Syntax <# var con = SchemaManager.CreateConnectionNode(...); #> <# var metadata = con.GetDatabaseSchema(); #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# foreach (var table in metadata.TableNodes) { #> <Package Name="Load_<#=table.Name#>"></Package> <# } #> </Packages> </Biml>
  • 13. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlScript Syntax: Import metadata <# var con = SchemaManager.CreateConnectionNode(...); #> <# var metadata = con.GetDatabaseSchema(); #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# foreach (var table in metadata.TableNodes) { #> <Package Name="Load_<#=table.Name#>"></Package> <# } #> </Packages> </Biml>
  • 14. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlScript Syntax: Loop over tables <# var con = SchemaManager.CreateConnectionNode(...); #> <# var metadata = con.GetDatabaseSchema(); #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# foreach (var table in metadata.TableNodes) { #> <Package Name="Load_<#=table.Name#>"></Package> <# } #> </Packages> </Biml>
  • 15. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlScript Syntax: Replace static values <# var con = SchemaManager.CreateConnectionNode(...); #> <# var metadata = con.GetDatabaseSchema(); #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# foreach (var table in metadata.TableNodes) { #> <Package Name="Load_<#=table.Name#>"></Package> <# } #> </Packages> </Biml>
  • 16. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How does it work?
  • 17. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Yes, but how does it work?
  • 18. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Yes, but how does it actually work? <# foreach (var table in metadata.TableNodes) { #> <Package Name="Load_<#=table.Name#>"></Package> <# } #> <Package Name="Load_Customer"></Package> <Package Name="Load_Product"></Package> <Package Name="Load_Sales"></Package>
  • 19. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml Tools Comparison
  • 20. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net What do you need?
  • 21. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlExpress Free add-in for Visual Studio Code editor with syntax highlighting and Biml Intellisense More frequent updates than BIDS Helper varigence.com/bimlexpress
  • 22. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlOnline Free browser-based Biml editor Code editor with Biml and C# Intellisense Reverse-engineer from SSIS to Biml bimlonline.com
  • 23. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net BimlStudio Licensed full-featured development environment for Biml Visual designer and metadata modeling Full-stack automation and transformers varigence.com/bimlstudio
  • 24. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml Tools Comparison Free Biml Intellisense Preview BimlScript Free Full Intellisense Logical View Licensed Full IDE SSAS+++
  • 25. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Code Management
  • 26. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Don't Repeat Yourself Move common code to separate files Centralize and reuse in many projects Update code once for all projects 1. Tiered Biml Files 2. Include Files 3. CallBimlScript
  • 27. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files
  • 28. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files Split Biml code in multiple files to: • Solve logical dependencies • Build solutions in multiple steps behind the scenes Specify the tier per file by using the template directive: <#@ template tier="2" #>
  • 29. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files Biml is compiled step-by-step from lowest to highest tier • Biml files are implicitly tier 0 • BimlScript files are implicitly tier 1 In each tier, objects are added to the in-memory RootNode Higher tiers can use objects from lower tiers
  • 30. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net What is this RootNode? When working with Biml, the <Biml> root element contains collections of elements: When working with BimlScript, the RootNode object contains collections of objects: <Biml> <Connections>...</Connections> <Databases>...</Databases> <Schemas>...</Schemas> <Tables>...</Tables> <Projects>...</Projects> <Packages>...</Packages> </Biml>
  • 31. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 32. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 33. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 34. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 35. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 36. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 37. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 38. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 39. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 40. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 41. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Tiered Biml Files: Behind the Scenes
  • 42. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How do you use Tiered Biml Files? 1. Create Biml files with specified tiers 2. Select all the tiered Biml files 3. Right-click and click Generate SSIS Packages 1 2 3
  • 43. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Include Files
  • 44. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Include Files Include common code in multiple files and projects Can include many file types: .biml .txt .sql .cs Use the include directive <#@ include file="CommonCode.biml" #> The directive will be replaced by the included file Works like an automated Copy & Paste
  • 45. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Include Files
  • 46. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Include Files
  • 47. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Include Files
  • 48. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Global Include Files
  • 49. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Global Include Files Use the global directive <#@ global #> Use instead of adding include directive to all files to • Create global variables • Include code files • Make VB default language
  • 50. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Global Include Files Specify directive attributes to control global include files <#@ global order="1" location="top" active="true" applytocallbimlscript="false" #>
  • 51. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Global Include Files
  • 52. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Global Include Files
  • 53. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How do you use Global Include Files? 1. Create Global Include File 2. Select Biml files and Global Include File 3. Right-click and click Generate SSIS Packages 1 2 3
  • 54. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript
  • 55. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript Works like a parameterized include (or stored procedure) File to be called (callee) specifies accepted parameters: <#@ property name="Parameter" type="String" #> File that calls (caller) passes parameters: <#=CallBimlScript("Common.biml", Parameter)#>
  • 56. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript
  • 57. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript
  • 58. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript
  • 59. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript
  • 60. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScript
  • 61. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput
  • 62. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput Callee specifies custom output object: <# CustomOutput.BimlComment = "Comment"; #> Caller defines, passes and uses output object: <# dynamic outObj; #> <#=CallBimlScriptWithOutput("CommonCode.biml", out outObj)#> <#=outObj.BimlComment#>
  • 63. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput
  • 64. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput
  • 65. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput
  • 66. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput
  • 67. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net CallBimlScriptWithOutput use CustomOutput
  • 68. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How does this actually work?
  • 69. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Passing code between files
  • 70. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Annotations and ObjectTags Annotations and ObjectTags are Key / Value pairs Use them to pass code between Biml files Annotations: String / String ObjectTags: String / Object
  • 71. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Annotations Create annotations: <OleDbConnection Name="Destination" ConnectionString="…"> <Annotations> <Annotation Tag="Schema">AW2014</Annotation> </Annotations> </OleDbConnection> Use annotations: RootNode.OleDbConnections["Destination"].GetTag("Schema");
  • 72. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net ObjectTags Create ObjectTags: RootNode.OleDbConnections["Destination"].ObjectTag["Filter"] = new List<string>{"Product","ProductCategory"}; Use ObjectTags: RootNode.OleDbConnections["Destination"].ObjectTag["Filter"];
  • 73. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ
  • 74. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ (Language-Integrated Query) One language to query: SQL Server Databases Datasets Collections Two ways to write queries: SQL-ish Syntax Extension Methods
  • 75. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ Extension Methods Sort OrderBy, ThenBy Filter Where, OfType Group GroupBy Aggregate Count, Sum Check Collections All, Any, Contains Get Elements First, Last, ElementAt Project Collections Select, SelectMany
  • 76. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ Extension Methods Example var numConnections = RootNode.Connections.Count() foreach (var table in RootNode.Tables.Where(…)) if (RootNode.Packages.Any(…))
  • 77. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ Extension Methods Example foreach (var table in RootNode.Tables.Where(…)) if (RootNode.Packages.Any(…)) But what do you put in here?
  • 78. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Lambda Expressions "A lambda expression is an anonymous function that you can use to create delegates or expression tree types"
  • 79. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Lambda Expressions …huh? o_O
  • 80. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Lambda Expressions table => table.Name == "Product"
  • 81. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Lambda Expressions table => table.Name == "Product" The arrow is the lambda operator
  • 82. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Lambda Expressions table => table.Name == "Product" Input parameter is on the left side
  • 83. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Lambda Expressions table => table.Name == "Product" Expression is on the right side
  • 84. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ and Lambda Chain LINQ Methods and use Lambda Expressions for simple and powerful querying of collections: .Where(table => table.Schema.Name == "Production") .OrderBy(table => table.Name)
  • 85. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Filter collections Where() Returns the filtered collection with all elements that meet the criteria RootNode.Tables.Where(t => t.Schema.Name == "Production") OfType() Returns the filtered collection with all elements of the specified type RootNode.Connections.OfType<AstExcelOleDbConnectionNode>()
  • 86. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Sort collections OrderBy() Returns the collection sorted by key… RootNode.Tables.OrderBy(t => t.Name) ThenBy() …then sorted by secondary key RootNode.Tables.OrderBy(t => t.Schema.Name) .ThenBy(t => t.Name)
  • 87. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Sort collections OrderByDescending() Returns the collection sorted by key… RootNode.Tables.OrderByDescending(t => t.Name) ThenByDescending() …then sorted by secondary key RootNode.Tables.OrderBy(t => t.Schema.Name) .ThenByDescending(t => t.Name)
  • 88. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Sort collections Reverse() Returns the collection sorted in reverse order RootNode.Tables.Reverse()
  • 89. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Group collections GroupBy() Returns a collection of key-value pairs where each value is a new collection RootNode.Tables.GroupBy(t => t.Schema.Name)
  • 90. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Aggregate collections Count() Returns the number of elements in the collection RootNode.Tables.Count() RootNode.Tables.Count(t => t.Schema.Name == "Production")
  • 91. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Aggregate collections Sum() Returns the sum of the (numeric) values in the collection RootNode.Tables.Sum(t => t.Columns.Count) Average() Returns the average value of the (numeric) values in the collection RootNode.Tables.Average(t => t.Columns.Count)
  • 92. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Aggregate collections Min() Returns the minimum value of the (numeric) values in the collection RootNode.Tables.Min(t => t.Columns.Count) Max() Returns the maximum value of the (numeric) values in the collection RootNode.Tables.Max(t => t.Columns.Count)
  • 93. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Check collections All() Returns true if all elements in the collection meet the criteria RootNode.Databases.All(d => d.Name.StartsWith("A")) Any() Returns true if any element in the collection meets the criteria RootNode.Databases.Any(d => d.Name.Contains("DW"))
  • 94. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Check collections Contains() Returns true if collection contains element RootNode.Databases.Contains(AdventureWorks2014)
  • 95. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Get elements First() Returns the first element in the collection (that meets the criteria) RootNode.Tables.First() RootNode.Tables.First(t => t.Schema.Name == "Production") FirstOrDefault() Returns the first element in the collection or default value (that meets the criteria) RootNode.Tables.FirstOrDefault() RootNode.Tables.FirstOrDefault(t => t.Schema.Name == "Production")
  • 96. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Get elements Last() Returns the last element in the collection (that meets the criteria) RootNode.Tables.Last() RootNode.Tables.Last(t => t.Schema.Name == "Production") LastOrDefault() Returns the last element in the collection or default value (that meets the criteria) RootNode.Tables.LastOrDefault() RootNode.Tables.LastOrDefault(t => t.Schema.Name == "Production")
  • 97. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Get elements ElementAt() Returns the element in the collection at the specified index RootNode.Tables.ElementAt(42) ElementAtOrDefault() Returns the element in the collection or default value at the specified index RootNode.Tables.ElementAtOrDefault(42)
  • 98. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Project collections Select() Creates a new collection from one collection A list of table names: RootNode.Tables.Select(t => t.Name) A list of table and schema names: RootNode.Tables.Select(t => new {t.Name, t.Schema.Name})
  • 99. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net LINQ: Project collections SelectMany() Creates a new collection from many collections and merges the collections A list of all columns from all tables: RootNode.Tables.SelectMany(t => t.Columns)
  • 100. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Error Handling and Debugging
  • 101. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Error Handling
  • 102. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml Validation Biml has built-in ValidationReporter Create custom warnings and errors Especially useful in teams
  • 103. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml Validation: ValidationReporter Build will succeed on Warning <# ValidationReporter.Report(Severity.Warning, "Oops!"); #> Build will fail on Error, but not immediately <# ValidationReporter.Report(Severity.Error,"Uh-oh!"); #> Build will immediately fail on Fatal Error <# ValidationReporter.Report(Severity.Fatal, "PANIC!"); #>
  • 104. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Debugging
  • 105. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml Debugging Include DebugUtilities.cs in your project Reference code file <#@ code file="DebugUtilities.cs" #> Get all property values on Biml objects <#=table.GetAllPropertyValues()#>
  • 106. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How do you debug Biml?
  • 107. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Classes and Methods
  • 108. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net C# Classes and Methods BimlScript and LINQ not enough? Need to reuse C# code? Create your own classes and methods!
  • 109. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net C# Classes and Methods public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != ""); } }
  • 110. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net C# Classes and Methods: Class public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != ""); } }
  • 111. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net C# Classes and Methods: Method public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != ""); } }
  • 112. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net C# Classes and Methods: Logic public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != ""); } }
  • 113. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Where do you put your C# code? Inline Code Blocks <#+ ... #> Included Biml Files with Code Blocks <#@ include file="CodeBlock.biml" #> Code Files <#@ code file="Code.cs" #>
  • 114. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Inline Code Blocks <#+ ... #>
  • 115. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Inline Code Blocks <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables) { #> <# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #> ... <# } #> <# } #> </Biml> <#+ public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } } #>
  • 116. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Included Biml Files with Code Blocks <#+ ... #>
  • 117. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Included Biml Files with Code Blocks <#@ include file="HelperClass.biml" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables) { #> <# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #> ... <# } #> <# } #> </Biml> <#+ public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } } #>
  • 118. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Code Files
  • 119. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Code Files <#@ code file="HelperClass.cs" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables) { #> <# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #> ... <# } #> <# } #> </Biml> public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } }
  • 120. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How do you create C# classes and methods?
  • 121. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Extension Methods
  • 122. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Extension Methods "Make it look like the method belongs to an object instead of a helper class"
  • 123. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Extension Methods: From this… <#@ code file="HelperClass.cs" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables) { #> <# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #> ... <# } #> <# } #> </Biml> public static class HelperClass { public static bool AnnotationTagExists(AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } }
  • 124. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Extension Methods: …to this <#@ code file="HelperClass.cs" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables) { #> <# if (HelperClass.AnnotationTagExists(table, "SourceSchema")) { #> ... <# } #> <# } #> </Biml> public static class HelperClass { public static bool AnnotationTagExists(this AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } }
  • 125. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Extension Methods: …to this <#@ code file="HelperClass.cs" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables) { #> <# if (table.AnnotationTagExists("SourceSchema")) { #> ... <# } #> <# } #> </Biml> public static class HelperClass { public static bool AnnotationTagExists(this AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } }
  • 126. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Extension Methods: …to this :) <#@ code file="HelperClass.cs" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <# foreach (var table in RootNode.Tables.Where(t => t.AnnotationTagExists("SourceSchema")) { #> ... <# } #> <# } #> </Biml> public static class HelperClass { public static bool AnnotationTagExists(this AstNode node, string tag) { return (node.GetTag(tag) != "") ? true : false; } }
  • 127. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net How do you create C# extension methods?
  • 128. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Code Management …the past 75 minutes… C# Classes and MethodsPractical Biml Coding
  • 129. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Where can you learn more?
  • 130. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net
  • 131. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Get things done Start small Start simple Start with ugly code Keep going Expand Improve Deliver often
  • 132. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net Biml on Monday… …BimlBreak the rest of the week ☺
  • 133. Cathrine Wilhelmsen - contact@cathrinewilhelmsen.net @cathrinew cathrinew.net linkedin.com/in/cathrinewilhelmsen hi@cathrinew.net slideshare.net/cathrinewilhelmsen Biml resources and references: cathrinew.net/biml