SlideShare a Scribd company logo
1 of 26
CREATING A META DATA DRIVEN
SSIS SOLUTION WITH BIML

MARCO SCHREUDER
WHO I AM
Name:
Nationality:
Company:

Marco Schreuder
Dutch
in2bi
•
•
•
•

Tweet:
Mail:
Comment:

Datawarehousing sql server
SSIS
SSAS
SSRS (limit)

@in2bi
marco@in2bi.nl
http://blog.in2bi.com

Creating a Meta Data Driven SSIS Solution with Biml
BIML
• Business Intelligence Markup Language

• Invention of Varigence (varigence.com)
• (Partly) donated to the (open source)BIDS helper project
bidshelper.codeplex.com
• Describes BI Solution in a simple xml format

• Biml script to automate package creation

Creating a Meta Data Driven SSIS Solution with Biml
SOLUTION

Creating a Meta Data Driven SSIS Solution with Biml
THE BOSS

Creating a Meta Data Driven SSIS Solution with Biml
META DATA
-

Sql

-

Sys.

dtsx xml file describing
• Control Flow
• Data Flow
• Lay-out in BIDS
.biml

Creating a Meta Data Driven SSIS Solution with Biml
SOLUTION

source

staging

BIML
META DATABASE

Creating a Meta Data Driven SSIS Solution with Biml

dwh
SB01 SIMPLE PACKAGE

Creating a Meta Data Driven SSIS Solution with Biml
SB02 SIMPLE PACKAGES

Creating a Meta Data Driven SSIS Solution with Biml
SB02 HOW IT WORKS
BIML SCRIPT

EXPAND

xml

Creating a Meta Data Driven SSIS Solution with Biml

xml

GENERATE
GREAT!! ... But ...

• Shouldn’t you TRUNCATE
the destination ...
• And what if bulk inserts fails?

You better take a MODULAR
approach

Creating a Meta Data Driven SSIS Solution with Biml
SB03 MODULAR PACKAGES
Control Flow

Data Flow

Creating a Meta Data Driven SSIS Solution with Biml
SB03 WHAT CHANGED
- <#@ include file="SB00_Connections.biml" #>
that Is used to import another biml file (or part) to optimise reuse
- We changes the start and end position of the for each loop
Making it possible to create more than one file
- Next we added a condition to check if we should truncate the
destination file
a setting in the meta data table

- We added two extra destinations to the data flow and used the error
path as input path
(explain: default = name.output but there are others like name.error
and later we’ll see some more)
- Of course we have to define errorhandling in the destination
components
<ErrorHandling ErrorRowDisposition="RedirectRow"
TruncationRowDisposition="RedirectRow" />

Creating a Meta Data Driven SSIS Solution with Biml
WOW!! ... But ...

Shouldn’t we do some logging
and execution lineage?
Please log:
- # rows in destination before
and after
- # rows inserted
- # errorrows (in errorfile)
- Start- and EndDate

Creating a Meta Data Driven SSIS Solution with Biml
SB04 PACKAGES WITH LOGGING
Control Flow

Creating a Meta Data Driven SSIS Solution with Biml

Data Flow
SB04 LOGGING
- SQL: Audit Table

- SQL: 2 Stored Procedures
- uspNewAuditRow
- uspupdateAuditRow
- BIML: Add Variables

- BIML: 2 Execute SQL Tasks (start and end)
Counters:
-

BIML: 2 Execute SQL Tasks (getting #rows)

-

BIML: 2 Row Count components in dataflow

Creating a Meta Data Driven SSIS Solution with Biml
Almost there ...

Let’s discuss:
- Configurations
- Logging error messages
- Logging execution of tasks
Should they be included in our
ETL framework?

Creating a Meta Data Driven SSIS Solution with Biml
SB05 CONFIGURATIONS
<PackageConfigurations>
<PackageConfiguration Name="META" >
<EnvironmentVariableInput EnvironmentVariable="Northwind_Config“ />
<ConfigurationValues>
<ConfigurationValue
DataType=“String"
PropertyPath="Package.Connections[META].Properties[ConnectionString]"
Name="META"
Value="Data Source=.;Initial Catalog=MyDwh_meta;Provider=SQLNCLI10.1;Integrated Security=SSPI;">
</ConfigurationValue>
</ConfigurationValues>
</PackageConfiguration>
<PackageConfiguration Name="<#=pkg["SourceConnection"]#>" ConnectionName="META">
<ExternalTableInput Table="[dbo].[SsisConfiguration]" />
</PackageConfiguration>
<#if (pkg["SourceConnection"].ToString()!=pkg["DestinationConnection"].ToString()) {#>
<PackageConfiguration Name="<#=pkg["DestinationConnection"]#>" ConnectionName="META">
<ExternalTableInput Table="[dbo].[SsisConfiguration]" />
</PackageConfiguration>
<#}#>
</PackageConfigurations>

Creating a Meta Data Driven SSIS Solution with Biml
SB05 LOGGING ERRORS / TASK
Errors

Task

Events:

OnError

OnPreExecute
OnPostExecute

Table

SsisErrorLog

SsisTaskLog

Stored Procedures

uspNewErrorLogRow

uspNewTaskLogRow
uspUpdateTaskLogRow

Creating a Meta Data Driven SSIS Solution with Biml
INTERMEZZO / QA
We discussed:

•

Need for automation in datawarehousing

•

Biml – how it works

•

Bimlscript

•

ETL Framework

•

Responding to changes with Biml

Next:
•

Dimension table loading

•

Factable loading

•

Masterpackage

Creating a Meta Data Driven SSIS Solution with Biml
I discussed dimensions with
the business

Creating a Meta Data Driven SSIS Solution with Biml
SB06 DIMENSION PACKAGES
• We use views to join staging tables

• An extra table in the meta database with column
information
• SCD Transformation (Wizard)

Creating a Meta Data Driven SSIS Solution with Biml
SCD Wizard? ...

I thought that didn’t perform?

Creating a Meta Data Driven SSIS Solution with Biml
SB07 FACTTABLE PACKAGES
• We use a view to join staging tables

• An extra table in the meta databse with column
information
• Lookup component to lookup keys of dimension
tables

Creating a Meta Data Driven SSIS Solution with Biml
SB08 MASTER PACKAGE

Creating a Meta Data Driven SSIS Solution with Biml
THANK YOU
Goal: Get them interested in Biml to start using it
So please:
Tweet:

@in2bi

Mail:

marco@in2bi.nl

Comment:

http://blog.in2bi.com

Creating a Meta Data Driven SSIS Solution with Biml

More Related Content

What's hot

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
 
Databind in asp.net
Databind in asp.netDatabind in asp.net
Databind in asp.netSireesh K
 
Azure sql database limitations
Azure sql database limitationsAzure sql database limitations
Azure sql database limitationsBRIJESH KUMAR
 
Agile Database Development with Liquibase
Agile Database Development with LiquibaseAgile Database Development with Liquibase
Agile Database Development with LiquibaseTim Berglund
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developersIllia Seleznov
 
JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017Luigi Fugaro
 
Configuring a more secure BOSH
Configuring a more secure BOSHConfiguring a more secure BOSH
Configuring a more secure BOSHSaman Alvi
 
Higher Productivity With Ase
Higher Productivity With AseHigher Productivity With Ase
Higher Productivity With Asesparkwan
 
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment ArchitectureJBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment Architectureejlp12
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with LiquibaseIllia Seleznov
 
ATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,PricingATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,Pricingpraveen chinnam
 
8\9 SSIS 2008R2_Training - Debugging_Package
8\9 SSIS 2008R2_Training - Debugging_Package8\9 SSIS 2008R2_Training - Debugging_Package
8\9 SSIS 2008R2_Training - Debugging_PackagePramod Singla
 

What's hot (20)

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...
 
Partially Contained Databases
Partially Contained DatabasesPartially Contained Databases
Partially Contained Databases
 
Databind in asp.net
Databind in asp.netDatabind in asp.net
Databind in asp.net
 
Azure sql database limitations
Azure sql database limitationsAzure sql database limitations
Azure sql database limitations
 
Data Binding
Data BindingData Binding
Data Binding
 
ATG Architecture
ATG ArchitectureATG Architecture
ATG Architecture
 
Ssn0020 ssis 2012 for beginners
Ssn0020   ssis 2012 for beginnersSsn0020   ssis 2012 for beginners
Ssn0020 ssis 2012 for beginners
 
Agile Database Development with Liquibase
Agile Database Development with LiquibaseAgile Database Development with Liquibase
Agile Database Development with Liquibase
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
 
JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017
 
Configuring a more secure BOSH
Configuring a more secure BOSHConfiguring a more secure BOSH
Configuring a more secure BOSH
 
Higher Productivity With Ase
Higher Productivity With AseHigher Productivity With Ase
Higher Productivity With Ase
 
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment ArchitectureJBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
 
Phpmysqlcoding
PhpmysqlcodingPhpmysqlcoding
Phpmysqlcoding
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with Liquibase
 
Liquibase case study
Liquibase case studyLiquibase case study
Liquibase case study
 
What's new in the July 2017 Update for Dynamics 365 - Developer features
What's new in the July 2017 Update for Dynamics 365 - Developer featuresWhat's new in the July 2017 Update for Dynamics 365 - Developer features
What's new in the July 2017 Update for Dynamics 365 - Developer features
 
ATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,PricingATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,Pricing
 
8\9 SSIS 2008R2_Training - Debugging_Package
8\9 SSIS 2008R2_Training - Debugging_Package8\9 SSIS 2008R2_Training - Debugging_Package
8\9 SSIS 2008R2_Training - Debugging_Package
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 

Viewers also liked

Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...
Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...
Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...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: BI to the next level
BIML: BI to the next levelBIML: BI to the next level
BIML: BI to the next levelDavide Mauri
 
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 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
 
Supply Chain Best Practices
Supply Chain Best Practices Supply Chain Best Practices
Supply Chain Best Practices carlgiardina
 
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
 
Webinar SQM Best Practices and Insights
Webinar SQM Best Practices and InsightsWebinar SQM Best Practices and Insights
Webinar SQM Best Practices and InsightsSparta Systems
 
Overview of Agile Methodology
Overview of Agile MethodologyOverview of Agile Methodology
Overview of Agile MethodologyHaresh Karkar
 

Viewers also liked (9)

Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...
Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...
Don't Repeat Yourself - An Introduction to Agile SSIS Development (24 Hours o...
 
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: BI to the next level
BIML: BI to the next levelBIML: BI to the next level
BIML: BI to the next level
 
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 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)
 
Supply Chain Best Practices
Supply Chain Best Practices Supply Chain Best Practices
Supply Chain Best Practices
 
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)
 
Webinar SQM Best Practices and Insights
Webinar SQM Best Practices and InsightsWebinar SQM Best Practices and Insights
Webinar SQM Best Practices and Insights
 
Overview of Agile Methodology
Overview of Agile MethodologyOverview of Agile Methodology
Overview of Agile Methodology
 

Similar to Sql bits creating a meta data driven ssis solution with biml

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
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS IntrodructionDavid Ličen
 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6Usman Zafar Malik
 
Data Integration through Data Virtualization (SQL Server Konferenz 2019)
Data Integration through Data Virtualization (SQL Server Konferenz 2019)Data Integration through Data Virtualization (SQL Server Konferenz 2019)
Data Integration through Data Virtualization (SQL Server Konferenz 2019)Cathrine Wilhelmsen
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSISMicrosoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSISMark Kromer
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfI am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfirshadkumar3
 
Designer's Favorite New Features in SQLServer
Designer's Favorite New Features in SQLServerDesigner's Favorite New Features in SQLServer
Designer's Favorite New Features in SQLServerKaren Lopez
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actionsAren Zomorodian
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutionswoutervugt
 
OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL Suraj Bang
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerRob van den Berg
 
Microsoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiMicrosoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiUnmesh Baile
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark Rackley
 

Similar to Sql bits creating a meta data driven ssis solution with biml (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...
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS Introdruction
 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6
 
Data Integration through Data Virtualization (SQL Server Konferenz 2019)
Data Integration through Data Virtualization (SQL Server Konferenz 2019)Data Integration through Data Virtualization (SQL Server Konferenz 2019)
Data Integration through Data Virtualization (SQL Server Konferenz 2019)
 
WebSphere Commerce v7 Data Load
WebSphere Commerce v7 Data LoadWebSphere Commerce v7 Data Load
WebSphere Commerce v7 Data Load
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSISMicrosoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
 
Running Databases on AWS
Running Databases on AWSRunning Databases on AWS
Running Databases on AWS
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfI am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
 
Designer's Favorite New Features in SQLServer
Designer's Favorite New Features in SQLServerDesigner's Favorite New Features in SQLServer
Designer's Favorite New Features in SQLServer
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actions
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
 
OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data Modeler
 
Microsoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiMicrosoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbai
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
Introduction to web design
Introduction to web designIntroduction to web design
Introduction to web design
 

Recently uploaded

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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 2024Rafal Los
 
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.pdfUK Journal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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 textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 organizationRadu Cotescu
 

Recently uploaded (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 

Sql bits creating a meta data driven ssis solution with biml

  • 1. CREATING A META DATA DRIVEN SSIS SOLUTION WITH BIML MARCO SCHREUDER
  • 2. WHO I AM Name: Nationality: Company: Marco Schreuder Dutch in2bi • • • • Tweet: Mail: Comment: Datawarehousing sql server SSIS SSAS SSRS (limit) @in2bi marco@in2bi.nl http://blog.in2bi.com Creating a Meta Data Driven SSIS Solution with Biml
  • 3. BIML • Business Intelligence Markup Language • Invention of Varigence (varigence.com) • (Partly) donated to the (open source)BIDS helper project bidshelper.codeplex.com • Describes BI Solution in a simple xml format • Biml script to automate package creation Creating a Meta Data Driven SSIS Solution with Biml
  • 4. SOLUTION Creating a Meta Data Driven SSIS Solution with Biml
  • 5. THE BOSS Creating a Meta Data Driven SSIS Solution with Biml
  • 6. META DATA - Sql - Sys. dtsx xml file describing • Control Flow • Data Flow • Lay-out in BIDS .biml Creating a Meta Data Driven SSIS Solution with Biml
  • 7. SOLUTION source staging BIML META DATABASE Creating a Meta Data Driven SSIS Solution with Biml dwh
  • 8. SB01 SIMPLE PACKAGE Creating a Meta Data Driven SSIS Solution with Biml
  • 9. SB02 SIMPLE PACKAGES Creating a Meta Data Driven SSIS Solution with Biml
  • 10. SB02 HOW IT WORKS BIML SCRIPT EXPAND xml Creating a Meta Data Driven SSIS Solution with Biml xml GENERATE
  • 11. GREAT!! ... But ... • Shouldn’t you TRUNCATE the destination ... • And what if bulk inserts fails? You better take a MODULAR approach Creating a Meta Data Driven SSIS Solution with Biml
  • 12. SB03 MODULAR PACKAGES Control Flow Data Flow Creating a Meta Data Driven SSIS Solution with Biml
  • 13. SB03 WHAT CHANGED - <#@ include file="SB00_Connections.biml" #> that Is used to import another biml file (or part) to optimise reuse - We changes the start and end position of the for each loop Making it possible to create more than one file - Next we added a condition to check if we should truncate the destination file a setting in the meta data table - We added two extra destinations to the data flow and used the error path as input path (explain: default = name.output but there are others like name.error and later we’ll see some more) - Of course we have to define errorhandling in the destination components <ErrorHandling ErrorRowDisposition="RedirectRow" TruncationRowDisposition="RedirectRow" /> Creating a Meta Data Driven SSIS Solution with Biml
  • 14. WOW!! ... But ... Shouldn’t we do some logging and execution lineage? Please log: - # rows in destination before and after - # rows inserted - # errorrows (in errorfile) - Start- and EndDate Creating a Meta Data Driven SSIS Solution with Biml
  • 15. SB04 PACKAGES WITH LOGGING Control Flow Creating a Meta Data Driven SSIS Solution with Biml Data Flow
  • 16. SB04 LOGGING - SQL: Audit Table - SQL: 2 Stored Procedures - uspNewAuditRow - uspupdateAuditRow - BIML: Add Variables - BIML: 2 Execute SQL Tasks (start and end) Counters: - BIML: 2 Execute SQL Tasks (getting #rows) - BIML: 2 Row Count components in dataflow Creating a Meta Data Driven SSIS Solution with Biml
  • 17. Almost there ... Let’s discuss: - Configurations - Logging error messages - Logging execution of tasks Should they be included in our ETL framework? Creating a Meta Data Driven SSIS Solution with Biml
  • 18. SB05 CONFIGURATIONS <PackageConfigurations> <PackageConfiguration Name="META" > <EnvironmentVariableInput EnvironmentVariable="Northwind_Config“ /> <ConfigurationValues> <ConfigurationValue DataType=“String" PropertyPath="Package.Connections[META].Properties[ConnectionString]" Name="META" Value="Data Source=.;Initial Catalog=MyDwh_meta;Provider=SQLNCLI10.1;Integrated Security=SSPI;"> </ConfigurationValue> </ConfigurationValues> </PackageConfiguration> <PackageConfiguration Name="<#=pkg["SourceConnection"]#>" ConnectionName="META"> <ExternalTableInput Table="[dbo].[SsisConfiguration]" /> </PackageConfiguration> <#if (pkg["SourceConnection"].ToString()!=pkg["DestinationConnection"].ToString()) {#> <PackageConfiguration Name="<#=pkg["DestinationConnection"]#>" ConnectionName="META"> <ExternalTableInput Table="[dbo].[SsisConfiguration]" /> </PackageConfiguration> <#}#> </PackageConfigurations> Creating a Meta Data Driven SSIS Solution with Biml
  • 19. SB05 LOGGING ERRORS / TASK Errors Task Events: OnError OnPreExecute OnPostExecute Table SsisErrorLog SsisTaskLog Stored Procedures uspNewErrorLogRow uspNewTaskLogRow uspUpdateTaskLogRow Creating a Meta Data Driven SSIS Solution with Biml
  • 20. INTERMEZZO / QA We discussed: • Need for automation in datawarehousing • Biml – how it works • Bimlscript • ETL Framework • Responding to changes with Biml Next: • Dimension table loading • Factable loading • Masterpackage Creating a Meta Data Driven SSIS Solution with Biml
  • 21. I discussed dimensions with the business Creating a Meta Data Driven SSIS Solution with Biml
  • 22. SB06 DIMENSION PACKAGES • We use views to join staging tables • An extra table in the meta database with column information • SCD Transformation (Wizard) Creating a Meta Data Driven SSIS Solution with Biml
  • 23. SCD Wizard? ... I thought that didn’t perform? Creating a Meta Data Driven SSIS Solution with Biml
  • 24. SB07 FACTTABLE PACKAGES • We use a view to join staging tables • An extra table in the meta databse with column information • Lookup component to lookup keys of dimension tables Creating a Meta Data Driven SSIS Solution with Biml
  • 25. SB08 MASTER PACKAGE Creating a Meta Data Driven SSIS Solution with Biml
  • 26. THANK YOU Goal: Get them interested in Biml to start using it So please: Tweet: @in2bi Mail: marco@in2bi.nl Comment: http://blog.in2bi.com Creating a Meta Data Driven SSIS Solution with Biml

Editor's Notes

  1. In this session we are going to create an ssis solution in short increments (sprints)Adding functionality with every sprint. There will be a total of 8 sprints in which we will build our etl solution ...for a simple datawarehouse based upon the Northwind database.As you can see we will use only 4 dimensions (Customer, Employee, Product and Time)And 1 factTable Order
  2. To complete this solution in time I hired a boss..He will help me by providing some feedback and steer me into the right direction.
  3. Let’s talk a bit about meta data ...It’s everywhere ... IN SQL Server:Sys viewsSSIS stores the meta data
  4. In this session we are going to create a solution.We will build an ETL solution that uses meta data stored in some tables in the meta database.These will describe the source and targets in our solution.We will use biml to creat the ssis packages that transform the data from source to staging to the data warehouse.
  5. But first let’s create a simple package with a biml file.This is an example of a simple biml file that defines an ssis package with one data flow.As you can see it has an understandable structure with (in this case) 2 main nodes:Connections with two OleDbConnection nodePackages (you can define more packages in one biml file)With tree Package-Tasks-DataFlow-TransformationsAnd two dataflow sources that describe the transfomation.Type example...So there is some meta data checking going..So what are the advantages of using biml...Isn’t it easier to just drop tasks and transformations on the ssis canvas ... Yes it is but the advantage lies in repeatabilityRepeatability in the form of code snippets ... That you add to your file andRepeatability by using biml script &gt;&gt;
  6. Here you see the magic combiningAnalogy with succesfull asp (html&amp;code: database driven websites)Start Code block with &lt;#Less then symbol and a hash End with: #&gt;A hash and a greater then symbol\\ double back-slash is escape sequence for a single back-slash{} curly brackets for the foreach loop
  7. So how does it work..Since where looping through all the rows in the dataset ...The xml code describing the package is repeated for each row .. Injecting the values we needSo it works in two steps: Expand .. In memory a larger biml file is created (repeating the xml block in the foreach statement)Next Generate .. the file is send to the compiler that creates the package
  8. Well ... That’s some great positive feedback ... Ain’t it?And well it makes senceFor these staging tables we should truncate them first. In fact in the SsisPackages table there is a column “TruncateDestination” we can use this value when we loop through the dataset.And maybe we can redirect the dataflow if the ‘bulk-insert’ fails.And yes modular approach with a package for each source-destination combination is a good option.Of course we will need a masterpackage to start each modular package but ... Le’t’s do that later.So how can we do that...
  9. Discuss this based on the demo:So we want to create this control flow with SQL Execute Task: Truncating the destinationAnd a Data Flow Task that handles errors:First try bulk loading with the fast-load (default) optionTry a row by row insert if bulk load failsIf there are any rows that can’t be insert write them to an error-file
  10. A short recap on the thinks we changed.
  11. Discuss execution lineageTo facilitate these whises we implemented in SSMS:SSISAudit TableStored Procedures to insert and update this table
  12. In the packages and biml file we added:Variables to hold recordcountsExecute SQL Task in Control Flow to start audit row (discuss parameters)Execute SQL Task in Control Flow to get #rows at startRow Count in the Data FlowA Derived Column Transformation to add Meta data to the data flowRow Count (for errors) in the Data FlowExecute SQL Task in Control Flow to get Final Row CountExecute SQL Task in Control Flow to update Audit row with rowcounters
  13. A short recap on the thinks we changed.
  14. You would typically use configurations to move packages from:Development – Q&amp;A – ProductionWithout the need to change configurations (mostly)With biml you could just change the configurations (SB00 ..file) and create the packages for each environment.In fact beeing able to recreate packages after you make changes to the biml file because of:Changing requirments for your ETL frameworkChanging to a new version of SQL (Denali)Is one of the advantages of using BIMLLogging error messages makes sense and the execution of tasks (when we get to more complicated packages)So how do we do that?...
  15. There are several ways you can use Configurations.In this case we opted for an environment variable that defines the meta database And there we defined the other connections
  16. To log errors and tasks we are using the event handling features of SSIS.For this purpose we created two tables and three stored procedures.Since we also want to track the time for each task.Therefore we need two events ..OnPreExecute and OnPostExecute
  17. What’s wrong with the sql statements