19
Building Your ETL Framework with BIML Meagan Longoria KCDC 2015

Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Building Your ETL Framework with BIMLMeagan Longoria

KCDC 2015

Page 2: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Begin at the Beginning

Slides are on my blog

Feel free to share questions and comments throughout the session

Page 3: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Who Are You?

Meagan Longoria

Business Intelligence Consultant at BlueGranite

Organizer of SQL Saturday Kansas City (Oct 3, 2015)

Blog: http://datasavvy.wordpress.com/

Twitter: @mmarie

LinkedIn: www.linkedin.com/in/meaganlongoria/

8 years in BI

7 years working with SSIS

Page 4: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

What on Earth is BIML?

Business Intelligence Markup Language

Domain specific language for describing business intelligence objects

XML that you can write to: Build packages faster

Ensure consistency

Free – comes with BIDS Helper

Also available in Mist

Page 5: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

BIMLScript

Allows you to extend BIML with C# or VB.NET

“Like ASP for BIML”

You can use BIMLScript to: Import database table schemas (quickly create/update your dev

environment to look like prod)

Replace static values with expressions

Include text from another BIML file or text file

Turn tedious, repetitive work into reusable scripts

BIML is still useful without BIMLScript, but much more powerful with it

Page 6: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

A Little Background

2008 - BIML was born

2008 - Varigence was founded by Scott Currie

2009 - BIMLScript was created

2011 - BIML compiler added to BIDS Helper

BIML describes SSIS packages, databases, schemas, tables, columns

SSAS cubes, facts, dimensions (Mist only)

Page 7: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

How It Works BIML/BIMLScript

BIMLCompiler

(Mist/BIDS Helper)

DTSX packages

Page 8: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

BIML is Awesome

All generated artifacts appear to be hand built

Packages can be deployed and run on unmodified SQL Server (no need to install anything on the server running the packages)

Free with BIDS Helper

Benefits: Reduce amount of time it takes to develop an SSIS project

Help you recover from Drag-and-drop-itis

Ensure a consistent design pattern

Stop solving the same problems over and over and move on to something new and interesting

Page 9: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

BIDS Helper

https://bidshelper.codeplex.com/

Choose the correct install for your version of SSDT/SQL Server

Current version is 1.7 Now properly supports SSIS 2014/Visual Studio 2013

Several BIML Updates, some breaking changes

Page 10: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Mist

IDE for authoring BIML code

Build via GUI or type code

Includes text editors with syntax highlighting, intellisense and quick-info displays, source control, and multi-monitor support

Import existing databases and SSIS packages

Free 14-day trial: reverse engineer 5 packages

Perpetual or subscription licenses available

Page 11: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

BIML Basics<Biml xmlns="http://schemas.varigence.com/biml.xsd">

<Packages>

<Package Name="MyBlankPackage">

</Package>

</Packages>

</Biml>

Demo

Page 12: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

My Learning Process

Created a blank package

Created connections

Created a staging package

Reverse engineer packages using Mist

Use the BIMLScript include

Create BIML library for common patterns (DB table staging, flat file import, fact , Type 1 SCD, Type 2 SCD)

Page 13: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

My First BIML Project

Just BIML, no script

Team members with little SSIS experience

Trying to ensure a consistent design pattern

Needed to finish the project quickly

SQL Server 2012, project deployment model

12 dims, 4 facts, 18 staging tables, 4 connections

Used template BIML to generate packages Saved pattern in BIML using AdventureWorks

Sent instructions to junior members on which items to change (connection, source query, destination table, etc.)

Had them generate the package without saving the BIML changes

Page 14: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Boost It With BIMLScript

Include

CallBIMLScript

Demo

Page 15: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

My SSIS Framework

3 schemas: Audit, Stage, Prod (whatever the project/subject area is called, ex: HR)

Audit schema contains two tables: PackageControl: Package execution details for easy querying and

restartability

PackageDependency: lists packages in groups and orders them for execution

Staging tables include all columns from source table for thin tables, select columns for wide tables, + audit fields

Views used to transform data and do lookups for dims and facts

Master packages for staging, dims, facts use package dependency for order and concurrency and package control for restartability

Demo

Page 16: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

My BIML Library

BIML files are included with each new SSIS project for source control

You decide whether you source control BIML, SSIS packages, or both. The right answer depends on your work processes.

My recommendation: Although you could describe tables in BIML, it is best to continue use of database projects to contain your table schemas, views, stored procedures

Troubleshooting and updates tend to occur in the database rather than the package once your design patterns are set.

Page 17: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Lessons Learned

Get ready to bang your head a few times. It’s fine. You won’t break anything.

Learn to abstract package definitions and use properties/parameters in BIML script to fully automate your package development.

BIML makes SSIS more accessible for .NET devs who occasionally dabble in SSIS.

Page 18: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Resources for Further Learning

Varigence BIML forums: https://www.varigence.com/Forums?forumName=Biml

BIMLScript.com http://bimlscript.com/Develop/Resources

Stairway to BIML: http://www.sqlservercentral.com/articles/BIML/100552/

BIDS Helper documentation: https://bidshelper.codeplex.com/documentation

http://geekswithblogs.net/darrengosbell/archive/2015/04/24/bids-helper-1.7.0-released.aspx

https://varigence.com/Documentation/Samples/Biml/

http://billfellows.blogspot.com/

Page 19: Building Your ETL Framework with BIML - WordPress.com · Building Your ETL Framework with BIML Meagan Longoria KCDC 2015. Begin at the Beginning Slides are on my blog Feel free to

Final Questions and Comments

Feel free to contact me with questions or feedback.

Meagan Longoria

Blog: datasavvy.wordpress.com

Twitter: @mmarie

LinkedIn: www.linkedin.com/in/meaganlongoria/

Company Website: http://www.blue-granite.com/