SlideShare a Scribd company logo
1 of 97
Download to read offline
Biml for Beginners
Speed Up Your SSIS Development
Cathrine Wilhelmsen, Data Warehouse Architect
Are you tired of creating and updating the same SSIS packages again and again? Is your wrist
hurting from all that clicking, dragging, dropping, connecting and aligning? Do you want to take
the next step and really speed up your SSIS development?
Say goodbye to repetitive work and hello to Biml, the markup language for Business Intelligence
projects.
In this session we will look at the basics of Biml. First learn how to use Biml to generate SSIS
packages from database metadata. Then see how you can reuse code to implement changes in
multiple SSIS packages and projects with just a few clicks. Finally, we will create an example
project that you can download and start with to speed up your SSIS development from day one.
Stop wasting your valuable time on doing the same things over and over and over again, and
see how you can complete in a day what once took more than a week!
Biml for Beginners: Speed Up Your SSIS Development
Please silence
cell phones
Explore Everything PASS Has to Offer
FREE ONLINE WEBINAR EVENTS FREE 1-DAY LOCAL TRAINING EVENTS
LOCAL USER GROUPS
AROUND THE WORLD
ONLINE SPECIAL INTEREST
USER GROUPS
BUSINESS ANALYTICS TRAINING
VOLUNTEERING OPPORTUNITIES
PASS COMMUNITY NEWSLETTER
BA INSIGHTS NEWSLETTERFREE ONLINE RESOURCES
Session Evaluations
ways to access
Go to passSummit.com Download the GuideBook App
and search: PASS Summit 2016
Follow the QR code link displayed
on session signage throughout the
conference venue and in the
program guide
Submit by 5pm
Friday November 6th to
WIN prizes
Your feedback is
important and valuable. 3
Biml Basics Tools & Projects
Code Management
…the next 75 minutes…
Cathrine Wilhelmsen
Data Warehouse Architect
Microsoft Data Platform MVP
BimlHero Certified Expert
SQLSaturday organizer
Speaker, blogger and chronic volunteer
@cathrinewcathrinew.net
SSIS developer?
Easily bored?
Tired of repetitive work?
Who are you?
Long development time?
Many SSIS packages?
Slow GUI editor?
Your work day?
Ever experienced this?
new standards!
…yay...job done!
Ready for a change?
Biml for Beginners: Speed Up Your SSIS Development (PASS Summit 2016)
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?
Why use Biml?
SSIS: Plumbing Biml: Business Logic
Time wasted on dragging, dropping, connecting, aligning
Create the same packages again with minor 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
SSIS: Plumbing
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
Biml: Business Logic
Biml is a tool for developing SSIS packages
Biml is not a tool for automated deployment
Biml is not a pre-defined ETL framework
Will Biml solve all your challenges?
Timesaving: Many SSIS packages from one Biml file
Reusable: Write once and run on any platform
Flexible: Start simple, expand as you learn
How can Biml help you?
What do you need?
Free open-source add-in for Visual Studio
60+ features for SSIS, SSAS and SSRS
Includes basic Biml package generator
BIDS Helper
bidshelper.codeplex.com
…or you can use the free Biml tools…
Free add-in for Visual Studio
Code editor with syntax highlighting and Intellisense
More frequent updates than BIDS Helper
BimlExpress
varigence.com/bimlexpress
Free browser-based Biml editor
Code editor with Biml and C# Intellisense
Reverse-engineer from SSIS to Biml
BimlOnline
bimlonline.com
How does it work?
…generated packages look exactly like manually created packages
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
Biml syntax
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
Biml syntax: Root Element
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
Biml syntax: Collections of Elements
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
Biml syntax: Elements
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
Biml syntax: Attributes
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="EmptyPackage1"></Package>
<Package Name="EmptyPackage2"/>
</Packages>
</Biml>
Biml syntax: Full vs. Shorthand Syntax
Let's generate
some packages!
Goal: Load from source to staging
Add New Biml File from BimlExpress menu…
…or right-click on SSIS project to Add New Biml File
Biml files are placed under Miscellaneous
Check Biml For Errors from BimlExpress menu…
…or right-click on file to Check Biml For Errors
Generate SSIS Packages from BimlExpress menu…
…or right-click on file to Generate SSIS Packages
From Biml to SSIS: Control Flow
<Package Name="TruncateLoad" ConstraintMode="Linear">
<Tasks>
<ExecuteSQL Name="Truncate Table" ConnectionName="Staging">
<DirectInput>TRUNCATE TABLE DestinationTable</DirectInput>
</ExecuteSQL>
<Dataflow Name="Load Table">
<Transformations>...</Transformations>
</Dataflow>
</Tasks>
</Package>
From Biml to SSIS: Data Flow
<Transformations>
<OleDbSource Name="Source" ConnectionName="AW2014">
<ExternalTableInput Table="SourceTable" />
</OleDbSource>
<DerivedColumns Name="Add LoadDate">
<Columns>
<Column Name="LoadDate" DataType="DateTime">
@[System::StartTime]
</Column>
</Columns>
</DerivedColumns>
<OleDbDestination Name="Destination" ConnectionName="Staging">
<ExternalTableOutput Table="DestinationTable" />
</OleDbDestination>
</Transformations>
.biml vs .dtsx: human-readable vs ALL THE CODE!
(20% zoom)(150% zoom)
Ok, so we can go from Biml to SSIS…
…can we go from SSIS to Biml?
Yes!
Let's reverse-engineer
some packages!
Package Importer in BimlOnline
Choose a File
Convert from SSIS to Biml
Choose and filter assets
Copy the Biml…
…or Create /Add to BimlOnline Project
The magic is in the
Extend Biml with C# or VB code blocks
Import database structure and metadata
Loop over tables and columns
Expressions replace static values
Generate, control and manipulate Biml code
What is BimlScript?
<# … #> Control Nuggets (Control logic)
<#= … #> Text Nuggets (Returns string)
<#@ … #> Directives (Compiler instructions)
<#+ … #> Class Nuggets (Create C# classes)
BimlScript Code Nuggets
<# 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>
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>
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>
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>
BimlScript Syntax: Replace static values
Biml vs. BimlScript
XML Language
"Just plain text"
Generate, control and
manipulate Biml with C#
How does it work?
Yes, but how does it work?
Yes, but how does it actually work?
<# foreach (var table in RootNode.Tables) { #>
<Package Name="Load_<#=table.Name#>" />
<# } #>
<Package Name="Load_Customer" />
<Package Name="Load_Product" />
<Package Name="Load_Sales" />
Let's generate
a lot of packages!
Move common code to separate files
Centralize and reuse in many projects
Update code once for all projects
1. Include files
2. CallBimlScript with parameters
3. Tiered Biml files
Don't Repeat Yourself
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
Include Files
Include Files
Include Files
Include Files
Like a parameterized include or stored procedure
File to be called (callee) specifies input parameters
<#@ property name="Param" type="String" #>
File that calls (caller) passes input parameters
<#=CallBimlScript("CommonCode.biml", Param)#>
CallBimlScript with Parameters
CallBimlScript with Parameters
CallBimlScript with Parameters
CallBimlScript with Parameters
CallBimlScript with Parameters
CallBimlScript with Parameters
Split Biml code in multiple files
Specify tiers by using the template directive
<#@ template tier="2" #>
Biml files without BimlScript are implicitly tier 0
Biml files with BimlScript are implicitly tier 1
Tiered Biml Files
Biml is compiled from lowest to highest tier to:
• Solve logical dependencies
• Build solutions in multiple steps behind the scenes
For each tier, objects are added to the RootNode
Higher tiers can use objects from lower tiers
Tiered Biml Files
When working with flat Biml,
the <Biml> root element
contains collections of elements:
<Biml>
<Connections>…</Connections>
<Databases>…</Databases>
<Schemas>…</Schemas>
<Tables>…</Tables>
<Projects>…</Projects>
<Packages>…</Packages>
</Biml>
When working with BimlScript,
the RootNode object contains
collections of objects:
What is this RootNode?
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: Tiered Biml Files
<#@ template tier="1" #>
<Connections>...</Connections>
<#@ template tier="2" #>
<Packages>...</Packages>
<#@ template tier="3" #>
<Package>...</Package>
Inside the Black Box: 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
How do you use Tiered Biml files?
1
2
3
How does this
actually work?
Biml Basics Tools & Projects
Code Management
…the past 75 minutes…
Free online training
bimlscript.com
Where can I learn more?
Get things done
Start small
Start simple
Start with ugly code
Keep going
Expand
Improve
Deliver often
…BimlBreak the rest of the week!
Biml on Monday...
Thank You!
Learn more from
Cathrine Wilhelmsen
cathrinew.net or follow @cathrinew
Session Evaluations
ways to access
Go to passSummit.com Download the GuideBook App
and search: PASS Summit 2016
Follow the QR code link displayed
on session signage throughout the
conference venue and in the
program guide
Submit by 5pm
Friday November 6th to
WIN prizes
Your feedback is
important and valuable. 3

More Related Content

More from 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
 

More from Cathrine Wilhelmsen (20)

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...
 
Understanding Azure Data Factory: The What, When, and Why (NIC 2020)
Understanding Azure Data Factory: The What, When, and Why (NIC 2020)Understanding Azure Data Factory: The What, When, and Why (NIC 2020)
Understanding Azure Data Factory: The What, When, and Why (NIC 2020)
 
Azure Data Factory for the SSIS Developer (SentryOne Webinar)
Azure Data Factory for the SSIS Developer (SentryOne Webinar)Azure Data Factory for the SSIS Developer (SentryOne Webinar)
Azure Data Factory for the SSIS Developer (SentryOne Webinar)
 
Azure Synapse Analytics Teaser (Microsoft TechX Oslo 2019)
Azure Synapse Analytics Teaser (Microsoft TechX Oslo 2019)Azure Synapse Analytics Teaser (Microsoft TechX Oslo 2019)
Azure Synapse Analytics Teaser (Microsoft TechX Oslo 2019)
 
Lessons Learned: Understanding Azure Data Factory Pricing (Microsoft Ignite 2...
Lessons Learned: Understanding Azure Data Factory Pricing (Microsoft Ignite 2...Lessons Learned: Understanding Azure Data Factory Pricing (Microsoft Ignite 2...
Lessons Learned: Understanding Azure Data Factory Pricing (Microsoft Ignite 2...
 
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
 
Creating Visual Transformations in Azure Data Factory (dataMinds Connect)
Creating Visual Transformations in Azure Data Factory (dataMinds Connect)Creating Visual Transformations in Azure Data Factory (dataMinds Connect)
Creating Visual Transformations in Azure Data Factory (dataMinds Connect)
 
Building Dynamic Pipelines in Azure Data Factory (Data Saturday Holland)
Building Dynamic Pipelines in Azure Data Factory (Data Saturday Holland)Building Dynamic Pipelines in Azure Data Factory (Data Saturday Holland)
Building Dynamic Pipelines in Azure Data Factory (Data Saturday Holland)
 
Pipelines and Packages: Introduction to Azure Data Factory (Techorama NL 2019)
Pipelines and Packages: Introduction to Azure Data Factory (Techorama NL 2019)Pipelines and Packages: Introduction to Azure Data Factory (Techorama NL 2019)
Pipelines and Packages: Introduction to Azure Data Factory (Techorama NL 2019)
 

Recently uploaded

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Biml for Beginners: Speed Up Your SSIS Development (PASS Summit 2016)

  • 1. Biml for Beginners Speed Up Your SSIS Development Cathrine Wilhelmsen, Data Warehouse Architect
  • 2. Are you tired of creating and updating the same SSIS packages again and again? Is your wrist hurting from all that clicking, dragging, dropping, connecting and aligning? Do you want to take the next step and really speed up your SSIS development? Say goodbye to repetitive work and hello to Biml, the markup language for Business Intelligence projects. In this session we will look at the basics of Biml. First learn how to use Biml to generate SSIS packages from database metadata. Then see how you can reuse code to implement changes in multiple SSIS packages and projects with just a few clicks. Finally, we will create an example project that you can download and start with to speed up your SSIS development from day one. Stop wasting your valuable time on doing the same things over and over and over again, and see how you can complete in a day what once took more than a week! Biml for Beginners: Speed Up Your SSIS Development
  • 4. Explore Everything PASS Has to Offer FREE ONLINE WEBINAR EVENTS FREE 1-DAY LOCAL TRAINING EVENTS LOCAL USER GROUPS AROUND THE WORLD ONLINE SPECIAL INTEREST USER GROUPS BUSINESS ANALYTICS TRAINING VOLUNTEERING OPPORTUNITIES PASS COMMUNITY NEWSLETTER BA INSIGHTS NEWSLETTERFREE ONLINE RESOURCES
  • 5. Session Evaluations ways to access Go to passSummit.com Download the GuideBook App and search: PASS Summit 2016 Follow the QR code link displayed on session signage throughout the conference venue and in the program guide Submit by 5pm Friday November 6th to WIN prizes Your feedback is important and valuable. 3
  • 6. Biml Basics Tools & Projects Code Management …the next 75 minutes…
  • 7. Cathrine Wilhelmsen Data Warehouse Architect Microsoft Data Platform MVP BimlHero Certified Expert SQLSaturday organizer Speaker, blogger and chronic volunteer @cathrinewcathrinew.net
  • 8. SSIS developer? Easily bored? Tired of repetitive work? Who are you?
  • 9. Long development time? Many SSIS packages? Slow GUI editor? Your work day?
  • 10. Ever experienced this? new standards! …yay...job done!
  • 11. Ready for a change?
  • 13. 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?
  • 14. Why use Biml? SSIS: Plumbing Biml: Business Logic
  • 15. Time wasted on dragging, dropping, connecting, aligning Create the same packages again with minor 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 SSIS: Plumbing
  • 16. 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 Biml: Business Logic
  • 17. Biml is a tool for developing SSIS packages Biml is not a tool for automated deployment Biml is not a pre-defined ETL framework Will Biml solve all your challenges?
  • 18. Timesaving: Many SSIS packages from one Biml file Reusable: Write once and run on any platform Flexible: Start simple, expand as you learn How can Biml help you?
  • 19. What do you need?
  • 20. Free open-source add-in for Visual Studio 60+ features for SSIS, SSAS and SSRS Includes basic Biml package generator BIDS Helper bidshelper.codeplex.com
  • 21. …or you can use the free Biml tools…
  • 22. Free add-in for Visual Studio Code editor with syntax highlighting and Intellisense More frequent updates than BIDS Helper BimlExpress varigence.com/bimlexpress
  • 23. Free browser-based Biml editor Code editor with Biml and C# Intellisense Reverse-engineer from SSIS to Biml BimlOnline bimlonline.com
  • 24. How does it work? …generated packages look exactly like manually created packages
  • 27. <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <Package Name="EmptyPackage1"></Package> <Package Name="EmptyPackage2"/> </Packages> </Biml> Biml syntax: Collections of Elements
  • 30. <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <Package Name="EmptyPackage1"></Package> <Package Name="EmptyPackage2"/> </Packages> </Biml> Biml syntax: Full vs. Shorthand Syntax
  • 32. Goal: Load from source to staging
  • 33. Add New Biml File from BimlExpress menu…
  • 34. …or right-click on SSIS project to Add New Biml File
  • 35. Biml files are placed under Miscellaneous
  • 36. Check Biml For Errors from BimlExpress menu…
  • 37. …or right-click on file to Check Biml For Errors
  • 38. Generate SSIS Packages from BimlExpress menu…
  • 39. …or right-click on file to Generate SSIS Packages
  • 40. From Biml to SSIS: Control Flow <Package Name="TruncateLoad" ConstraintMode="Linear"> <Tasks> <ExecuteSQL Name="Truncate Table" ConnectionName="Staging"> <DirectInput>TRUNCATE TABLE DestinationTable</DirectInput> </ExecuteSQL> <Dataflow Name="Load Table"> <Transformations>...</Transformations> </Dataflow> </Tasks> </Package>
  • 41. From Biml to SSIS: Data Flow <Transformations> <OleDbSource Name="Source" ConnectionName="AW2014"> <ExternalTableInput Table="SourceTable" /> </OleDbSource> <DerivedColumns Name="Add LoadDate"> <Columns> <Column Name="LoadDate" DataType="DateTime"> @[System::StartTime] </Column> </Columns> </DerivedColumns> <OleDbDestination Name="Destination" ConnectionName="Staging"> <ExternalTableOutput Table="DestinationTable" /> </OleDbDestination> </Transformations>
  • 42. .biml vs .dtsx: human-readable vs ALL THE CODE! (20% zoom)(150% zoom)
  • 43. Ok, so we can go from Biml to SSIS…
  • 44. …can we go from SSIS to Biml?
  • 45. Yes!
  • 47. Package Importer in BimlOnline
  • 49. Convert from SSIS to Biml
  • 52. …or Create /Add to BimlOnline Project
  • 53. The magic is in the
  • 54. Extend Biml with C# or VB code blocks Import database structure and metadata Loop over tables and columns Expressions replace static values Generate, control and manipulate Biml code What is BimlScript?
  • 55. <# … #> Control Nuggets (Control logic) <#= … #> Text Nuggets (Returns string) <#@ … #> Directives (Compiler instructions) <#+ … #> Class Nuggets (Create C# classes) BimlScript Code Nuggets
  • 56. <# 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> BimlScript Syntax
  • 57. <# 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> BimlScript Syntax: Import metadata
  • 58. <# 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> BimlScript Syntax: Loop over tables
  • 59. <# 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> BimlScript Syntax: Replace static values
  • 60. Biml vs. BimlScript XML Language "Just plain text" Generate, control and manipulate Biml with C#
  • 61. How does it work?
  • 62. Yes, but how does it work?
  • 63. Yes, but how does it actually work? <# foreach (var table in RootNode.Tables) { #> <Package Name="Load_<#=table.Name#>" /> <# } #> <Package Name="Load_Customer" /> <Package Name="Load_Product" /> <Package Name="Load_Sales" />
  • 64. Let's generate a lot of packages!
  • 65. Move common code to separate files Centralize and reuse in many projects Update code once for all projects 1. Include files 2. CallBimlScript with parameters 3. Tiered Biml files Don't Repeat Yourself
  • 66. 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 Include Files
  • 70. Like a parameterized include or stored procedure File to be called (callee) specifies input parameters <#@ property name="Param" type="String" #> File that calls (caller) passes input parameters <#=CallBimlScript("CommonCode.biml", Param)#> CallBimlScript with Parameters
  • 76. Split Biml code in multiple files Specify tiers by using the template directive <#@ template tier="2" #> Biml files without BimlScript are implicitly tier 0 Biml files with BimlScript are implicitly tier 1 Tiered Biml Files
  • 77. Biml is compiled from lowest to highest tier to: • Solve logical dependencies • Build solutions in multiple steps behind the scenes For each tier, objects are added to the RootNode Higher tiers can use objects from lower tiers Tiered Biml Files
  • 78. When working with flat Biml, the <Biml> root element contains collections of elements: <Biml> <Connections>…</Connections> <Databases>…</Databases> <Schemas>…</Schemas> <Tables>…</Tables> <Projects>…</Projects> <Packages>…</Packages> </Biml> When working with BimlScript, the RootNode object contains collections of objects: What is this RootNode?
  • 79. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 80. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 81. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 82. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 83. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 84. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 85. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 86. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 87. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 88. Inside the Black Box: Tiered Biml Files <#@ template tier="1" #> <Connections>...</Connections> <#@ template tier="2" #> <Packages>...</Packages> <#@ template tier="3" #> <Package>...</Package>
  • 89. Inside the Black Box: Tiered Biml Files
  • 90. 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
  • 92. Biml Basics Tools & Projects Code Management …the past 75 minutes…
  • 94. Get things done Start small Start simple Start with ugly code Keep going Expand Improve Deliver often
  • 95. …BimlBreak the rest of the week! Biml on Monday...
  • 96. Thank You! Learn more from Cathrine Wilhelmsen cathrinew.net or follow @cathrinew
  • 97. Session Evaluations ways to access Go to passSummit.com Download the GuideBook App and search: PASS Summit 2016 Follow the QR code link displayed on session signage throughout the conference venue and in the program guide Submit by 5pm Friday November 6th to WIN prizes Your feedback is important and valuable. 3