This document provides an overview of a session on using Biml (Business Intelligence Markup Language) to speed up SSIS (SQL Server Integration Services) development. Biml allows generating SSIS packages from metadata and implementing changes across packages with minimal code. The session introduces basic Biml syntax and generation of packages from Biml files. It also demonstrates more advanced techniques like using BimlScript code blocks to import metadata and control package generation, tiered Biml files to organize common code, and CallBimlScript to parameterize and reuse common logic across projects. The goal is to help attendees avoid repetitive tasks and speeds up development by separating logic from package generation and implementation using Biml.
Student profile product demonstration on grades, ability, well-being and mind...
Biml for Beginners: Speed up your SSIS development (SQLSaturday Vienna)
1. Biml for Beginners:
Speed up your SSIS development
Cathrine Wilhelmsen
SQLSaturday Vienna
April 1st 2016
2. Session Description
SSIS is a powerful tool for extracting, transforming and loading data, but creating and maintaining
a large number of SSIS packages can be both tedious and time-consuming. Even if you use
templates and follow best practices you often have to repeat the same steps over and over and
over again. Handling metadata and schema changes is a manual process, and there are no easy
ways to implement new requirements in multiple packages at the same time.
It is time to bring the Don't Repeat Yourself (DRY) software engineering principle to SSIS projects.
First learn how to use Biml and BimlScript to generate SSIS packages from database metadata and
implement changes in all packages with just a few clicks. Then take the DRY principle one step
further and learn how to update all packages in multiple projects by separating and reusing
common code.
Speed up your SSIS development by using Biml and BimlScript, and see how you can complete in a
day what once took more than a week!
11. Business Intelligence Markup Language
Easy to read and write XML language
Describes business intelligence objects:
• Databases, Schemas, Tables, Views, Columns
• SSIS Packages
• SSAS Cubes
What is Biml?
12. Why would you use Biml?
SSIS: Plumbing Biml: Business Logic
13. Traditional SSIS: Plumbing
Time wasted on dragging, dropping, connecting, aligning
Create the same package over and over and over again with just a few changes
Standards, patterns and templates must be defined up-front
Changes must be done in every single package
High risk of manual errors
More packages, more time
14. Agile SSIS: Business Logic
Spend time on what is unique in a package
Create a pattern once and reuse for all similar packages
Handle scope and requirement changes quickly and easily
Changes can be applied to all packages at once
Lower risk of manual errors
Longer time to start, but then reuse and scale
15. Will Biml solve all your challenges?
Probably not...
Biml is a tool for generating SSIS packages
Biml is not a pre-defined ETL framework
Biml is not a tool for automated deployment
...but it will solve many challenges!
16. How can Biml help you?
Biml is great for large projects with common patterns…
Timesaving: Many SSIS packages from one Biml file
Reusable: Write once and run on any platform
Flexible: Start simple, expand as you learn
…but is also useful for smaller projects!
48. 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 control and manipulate Biml code
49. BimlScript Code Nuggets
<#@ … #> Directives (Instructions to BimlCompiler)
<# … #> Control Nuggets (Control logic)
<#= … #> Text Nuggets (Replace nugget with text value)
<#+ … #> Class Nuggets (Create helper classes and methods)
60. 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 with parameters
Don't Repeat Yourself
61. BimlExpress vs. BimlOnline / BimlStudio
"Black Box"
Only SSIS packages visible
Visual Editors
All in-memory objects visible
62. Tiered Biml Files
Use the template directive:
<#@ template tier="1" #>
Create objects in-memory from lowest to highest tier to:
• Solve logical dependencies
• Simulate manual workflows
In-memory objects are added to the RootNode
Get objects from RootNode in higher tiers
63. Inside the Black Box: Tiered Biml Files
Tier 1: Create database connections
Tier 2: Create loading packages
Tier 3: Create master package to execute packages
75. 1. Create Biml files with specified tiers
2. Select all the tiered Biml files
3. Right-click and click Generate SSIS Packages
How do you use Tiered Biml files?
1
2
3
76. 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
Include pulls code from the included file into the main file
80. CallBimlScript with Parameters
Works like a parameterized include
File to be called (callee) specifies input parameters it accepts
<#@ property name="Table" type="AstTableNode" #>
File that calls (caller) passes input parameters
<#=CallBimlScript("CommonCode.biml", Table)#>
CallBimlScript pushes parameters from the caller to the callee, and the
callee returns code
88. What do you do next?
1. Install BimlExpress
2. Complete lessons on BimlScript.com
3. Identify your SSIS patterns
4. Rewrite one SSIS package to Biml
(Boost your learning by reverse-engineering with BimlOnline)
5. Expand with BimlScript
6. Separate and reuse common Biml code
7. ...never look back to the days of drag&drop :)
89. Get things done
Start small
Start simple
Start with ugly code
Keep going
Expand
Improve
Deliver often