Creating a Meta Data Driven SSIS Solution with Biml

Slides:



Advertisements
Similar presentations
Jose Chinchilla MCITP: Database Administrator, SQL Server 2008 MCTS: SQL Server 2005 & 2008 MCTS: Business Intelligence SQL Server 2008 Position(s): Business.
Advertisements

Jose Chinchilla, MCTS, MCITP. Nuevo Ambiente de Desarrollo SQL Server 2012 Habilidades T-SQL a Super Poderes SSIS Demo BIDS Fuentes de Datos (Data Sources)
SSIS Dataflow Performance Tuning 1 st October 2010 Jamie Thomson.
Module 8 Importing and Exporting Data. Module Overview Transferring Data To/From SQL Server Importing & Exporting Table Data Inserting Data in Bulk.
Introduction to ETL Using Microsoft Tools By Dr. Gabriel.
BIML & EzAPI.
Moving Data Lesson 23. Skills Matrix Moving Data When populating tables by inserting data, you will discover that data can come from various sources.
SSIS Field Notes Darren Green Konesans Ltd. SSIS Field Notes After years of careful observation and recording of the Species SSIS, Genus ETL, in both.
Copyright © 2013 Varigence, Inc. Biml - Introduction Session Peter Avenant
INTEGRATION SERVICES IN THE REAL WORLD Brian Garraty, Database Administrator Virginia Beach City Public Schools.
Error Handling in SSIS Reza Rad SQL Server MVP, Author, DW / BI Architect.
Copyright © 2013 Varigence, Inc. CSV files import automation Kostya Khomyakov
Top 10 SSIS Best Practices Tim Mitchell Artis Consulting The World’s Largest Community of SQL Server Professionals.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Copying, Managing, and Transforming Data With DTS.
Module 11: Data Transport. Overview Tools and functionality in Oracle and their equivalents in SQL Server for: Data transport out of the database Data.
SQL Server 2005 Integration Services Mike Taulty Developer & Platform Group Microsoft Ltd
ISQS 3358, Business Intelligence Extraction, Transformation, and Loading Zhangxi Lin Texas Tech University 1.
SSIS Over DTS Sagayaraj Putti (139460). 5 September What is DTS?  Data Transformation Services (DTS)  DTS is a set of objects and utilities that.
SQL Server Integration Services (SSIS) Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server (MVP) Microsoft Certified Technology Specialist.
What’s New in SSIS with SQL 2008 Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
 Nate Locklin ◦ Database Analyst, PPG Industries ◦  Steve Tirone ◦ Data Warehouse Analyst, Amerinet ◦
SEATTLE BI MEETUP BI & BIG FISH April 2 nd, 2014 Emre Motan.
HDNUG 27-March-2007 SQL Server 2005 Suite as a Business Intelligence Solution.
Understanding SSIS Control Flows Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
DTS Conversion to SSIS Conversion Best Practices Mike Davis
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Data Management Console Synonym Editor
DAT 360: DTS in SQL Server 2000 Best Practices Euan Garden Group Manager, SQL Server Microsoft Corporation.
Virtual techdays INDIA │ august 2010 SQL Data Loading Techniques Praveen Srivatsa │ Director, AsthraSoft Consulting Microsoft Regional Director,
Integration Services in SQL Server 2008 Allan Mitchell SQL Server MVP.
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
Building Data Integration Solutions with Integration Services Donald Farmer Group Program Manager Microsoft Corporation.
Creating Simple and Parallel Data Loads With DTS.
Best Practices in Loading Large Datasets Asanka Padmakumara (BSc,MCTS) SQL Server Sri Lanka User Group Meeting Oct 2013.
Scripting Just Enough SSIS to be Dangerous. 6/13/2015 Visit the Sponsor tables to enter their end of day raffles. Turn in your completed Event Evaluation.
Easy ETL with Thank you to our AWESOME sponsors!
Easy ETL with Andrzej Kukuła – Marcin Szeliga –
Copyright 2015 Varigence, Inc. Unit and Integration Testing in SSIS A New Approach Scott @varigence.
Pulling Data into the Model. Agenda Overview BI Development Studio Integration Services Solutions Integration Services Packages DTS to SSIS.
SSIS 2012: The Quiet Revolution Presented by Bryan Cafferky Business Intelligence Consultant BPC Global Solutions LLC
SSIS ETL Data Resource Management. Create an ETL package using a wizard database server to database server The business goal of this ETL package is to.
Practical MSBI(SSIS, SSAS,SSRS) online training. Contact Us: Call: Visit:
Microsoft BI Online Training AcuteSoft: India: , Land Line: +91 (0) USA: , UK.
Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create.
John Lloyd, Edgewater Fullscope
Building Your ETL Framework with Biml Meagan Longoria March 19, 2016.
PROJECT ORIENTED ONLINE TRAINING ON MSBI (IS,AS,RS)
SSIS Templates, Configurations & Variables
Managing, Storing, and Executing DTS Packages
BIML: Step by Step Julie Smith.
Presented By: Jessica M. Moss
Getting Started with Biml
Using Biml to Automate the Generation of SSIS Packages
Understanding SSIS Data Flows
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Simon Kingaby #SimonKingaby
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
ETL Automation using Biml
Using Biml to Automate the Generation of SSIS Packages
SSIS Data Integration Data Warehouse Acceleration
SSIS Data Integration Data Warehouse Acceleration
SSIS Data Integration Data Warehouse Acceleration
Just Enough SSIS Scripting to be Dangerous.
Optimizing the ETL Development process using BIML
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

Creating a Meta Data Driven SSIS Solution with Biml Marco Schreuder

Who I am Name: Marco Schreuder Nationality: Dutch Company: in2bi Datawarehousing sql server SSIS SSAS SSRS (limit) Tweet: @in2bi Mail: marco@in2bi.nl Comment: 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 Biml is a way of describing your bi solution in a simple xml format. And next creating that Bi solution based on that xml. And as you will see in this session you can use it to automate the creation of your bi-solution. Biml is an abbrevation of ... It’s invented by US company Varigence. And a large part of their product has been donated to bidshelper. (that is the creation of ssis packages based on biml) So that’s free! You can also us biml to describe your ssas solution. Dimensions, Hierarchies, Cubes etc.. (if you want that you need to by their product.. Mist) In a few weeks At Pass they have this action Creating a Meta Data Driven SSIS Solution with Biml

Solution 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 Creating a Meta Data Driven SSIS Solution with Biml

The Boss 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. 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 Let’s talk a bit about meta data ... It’s everywhere ... IN SQL Server: Sys views SSIS stores the meta data Creating a Meta Data Driven SSIS Solution with Biml

Solution source staging dwh BIML META DATABASE 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. BIML META DATABASE Creating a Meta Data Driven SSIS Solution with Biml

SB01 Simple Package 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 node Packages (you can define more packages in one biml file) With tree Package-Tasks-DataFlow-Transformations And 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 repeatability Repeatability in the form of code snippets ... That you add to your file and Repeatability by using biml script >> Creating a Meta Data Driven SSIS Solution with Biml

SB02 Simple packages Here you see the magic combining Analogy with succesfull asp (html&code: database driven websites) Start Code block with <# Less then symbol and a hash End with: #> A hash and a greater then symbol \\ double back-slash is escape sequence for a single back-slash {} curly brackets for the foreach loop Creating a Meta Data Driven SSIS Solution with Biml

SB02 How it works BIML SCRIPT EXPAND GENERATE xml xml 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 need So 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 Creating a Meta Data Driven SSIS Solution with Biml

You better take a MODULAR approach GREAT!! ... But ... Shouldn’t you TRUNCATE the destination ... And what if bulk inserts fails? You better take a MODULAR approach Well ... That’s some great positive feedback ... Ain’t it? And well it makes sence For 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... Creating a Meta Data Driven SSIS Solution with Biml

SB03 Modular Packages Control Flow Data Flow Discuss this based on the demo: So we want to create this control flow with SQL Execute Task: Truncating the destination And a Data Flow Task that handles errors: First try bulk loading with the fast-load (default) option Try a row by row insert if bulk load fails If there are any rows that can’t be insert write them to an error-file 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" /> A short recap on the thinks we changed. Creating a Meta Data Driven SSIS Solution with Biml

Shouldn’t we do some logging and execution lineage? Please log: 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 Discuss execution lineage To facilitate these whises we implemented in SSMS: SSISAudit Table Stored Procedures to insert and update this table Creating a Meta Data Driven SSIS Solution with Biml

SB04 Packages with Logging Control Flow Data Flow In the packages and biml file we added: Variables to hold recordcounts Execute SQL Task in Control Flow to start audit row (discuss parameters) Execute SQL Task in Control Flow to get #rows at start Row Count in the Data Flow A Derived Column Transformation to add Meta data to the data flow Row Count (for errors) in the Data Flow Execute SQL Task in Control Flow to get Final Row Count Execute SQL Task in Control Flow to update Audit row with rowcounters Creating a Meta Data Driven SSIS Solution with Biml

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 A short recap on the thinks we changed. Creating a Meta Data Driven SSIS Solution with Biml

Logging error messages Logging execution of tasks Almost there ... Let’s discuss: Configurations Logging error messages Logging execution of tasks Should they be included in our ETL framework? You would typically use configurations to move packages from: Development – Q&A – Production Without 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 framework Changing to a new version of SQL (Denali) Is one of the advantages of using BIML Logging error messages makes sense and the execution of tasks (when we get to more complicated packages) So how do we do that?... 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]" /> <#if (pkg["SourceConnection"].ToString()!=pkg["DestinationConnection"].ToString()) {#> <PackageConfiguration Name="<#=pkg["DestinationConnection"]#>" ConnectionName="META"> <#}#> </PackageConfigurations> 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 Creating a Meta Data Driven SSIS Solution with Biml

SB05 Logging errors / TASK Events: OnError OnPreExecute OnPostExecute Table SsisErrorLog SsisTaskLog Stored Procedures uspNewErrorLogRow uspNewTaskLogRow uspUpdateTaskLogRow 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 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

I thought that didn’t perform? 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 What’s wrong with the sql statements 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