SQL Server 2012. Integration Services. Design Patterns. Andy Leonard. Matt Masson Tim Mitchell. Jessica M. Moss. Michelle Ufford



Similar documents
SQL Server Integration Services Design Patterns

Microsoft. Microsoft SQL Server Integration Services. Wee-Hyong Tok. Rakesh Parida Matt Masson. Xiaoning Ding. Kaarthik Sivashanmugam

Implementing a Data Warehouse with Microsoft SQL Server 2012

Implementing a Data Warehouse with Microsoft SQL Server

COURSE 20463C: IMPLEMENTING A DATA WAREHOUSE WITH MICROSOFT SQL SERVER

Course Outline: Course: Implementing a Data Warehouse with Microsoft SQL Server 2012 Learning Method: Instructor-led Classroom Learning

Implementing a Data Warehouse with Microsoft SQL Server 2012 MOC 10777

Course Outline. Module 1: Introduction to Data Warehousing

Implementing a Data Warehouse with Microsoft SQL Server

Implementing a Data Warehouse with Microsoft SQL Server MOC 20463

COURSE OUTLINE MOC 20463: IMPLEMENTING A DATA WAREHOUSE WITH MICROSOFT SQL SERVER

Implementing a Data Warehouse with Microsoft SQL Server 2012 (70-463)

Implement a Data Warehouse with Microsoft SQL Server 20463C; 5 days

Implementing a Data Warehouse with Microsoft SQL Server

SSIS Training: Introduction to SQL Server Integration Services Duration: 3 days

East Asia Network Sdn Bhd

Course 10777A: Implementing a Data Warehouse with Microsoft SQL Server 2012

Implementing a Data Warehouse with Microsoft SQL Server 2012

Implementing a Data Warehouse with Microsoft SQL Server 2012

LearnFromGuru Polish your knowledge

Microsoft. Course 20463C: Implementing a Data Warehouse with Microsoft SQL Server

Implementing a Data Warehouse with Microsoft SQL Server

SQL Server Administrator Introduction - 3 Days Objectives

Beginning C# 5.0. Databases. Vidya Vrat Agarwal. Second Edition

Implementing a Data Warehouse with Microsoft SQL Server 2012

Beta: Implementing a Data Warehouse with Microsoft SQL Server 2012

Implementing a Data Warehouse with Microsoft SQL Server 2012

SQL Server 2012 Business Intelligence Boot Camp

Application Development

For Sales Kathy Hall

Implementing a Data Warehouse with Microsoft SQL Server 2014

Microsoft. MCSA upgrade to SQL Server 2012 Certification Courseware. Version 1.0

Correct Answer: J Explanation. Explanation/Reference: According to these references, this answer looks correct.

Course 10977A: Updating Your SQL Server Skills to Microsoft SQL Server 2014

AV-005: Administering and Implementing a Data Warehouse with SQL Server 2014

PASS4TEST 専 門 IT 認 証 試 験 問 題 集 提 供 者

Data Integration and ETL with Oracle Warehouse Builder: Part 1

OHLONE COLLEGE Ohlone Community College District OFFICIAL COURSE OUTLINE

Course 20463:Implementing a Data Warehouse with Microsoft SQL Server

AppFabric. Pro Windows Server. Stephen Kaufman. Danny Garber. Apress. INFORMATIONSBIBLIOTHbK TECHNISCHE. U N! V En SIT AT S R!

CHAPTER 1: INTRODUCTION TO SHAREPOINT

Implementing a SQL Data Warehouse 2016

Upgrading Your SQL Server Skills to Microsoft SQL Server 2014 va

Updating Your SQL Server Skills to Microsoft SQL Server 2014

Agenda. SSIS - enterprise ready ETL

Updating Your SQL Server Skills from Microsoft SQL Server 2008 to Microsoft SQL Server 2014

MS 10977B Upgrading Your SQL Server Skills to Microsoft SQL Server 2014

Pro NuGet. Second Edition. Maarten Balliauw. Xavier Decoster

MS 20487A Developing Windows Azure and Web Services

Updating Your SQL Server Skills to Microsoft SQL Server 2014

Implementing and Maintaining Microsoft SQL Server 2008 Integration Services

Building a Data Warehouse

SQL SERVER DEVELOPER Available Features and Tools New Capabilities SQL Services Product Licensing Product Editions Will teach in class room

COPYRIGHTED MATERIAL. 1Welcome to SQL Server Integration Services

Unified Data Integration Across Big Data Platforms

White Paper. Unified Data Integration Across Big Data Platforms

Office 2010 Workflow;

SAS Enterprise Data Integration Server - A Complete Solution Designed To Meet the Full Spectrum of Enterprise Data Integration Needs

White Paper

W I S E. SQL Server 2012 Database Engine Technical Update WISE LTD.

PassTest. Bessere Qualität, bessere Dienstleistungen!

COPYRIGHTED MATERIAL. Welcome to SQL Server Integration Services. What s New in SQL Server 2005 SSIS

10977B: Updating Your SQL Server Skills to Microsoft SQL Server 2014

Course 10977: Updating Your SQL Server Skills to Microsoft SQL Server 2014

Implementing and Administering an Enterprise SharePoint Environment

Microsoft SQL Business Intelligence Boot Camp

Beginning ASP.NET 4.5

Data Integration and ETL with Oracle Warehouse Builder NEW

Updating Your SQL Server Skills to Microsoft SQL Server 2014 (10977) H8B96S

Visual Basic. murach's TRAINING & REFERENCE

Development and Management

Course 40009A: Updating your Business Intelligence Skills to Microsoft SQL Server 2012

Managing Third Party Databases and Building Your Data Warehouse

The Evolution of ETL

Beginning SQL Server Administration. Apress. Rob Walters Grant Fritchey

Working with SQL Server Integration Services

Managing Data in Motion

Exam Number/Code: Exam Name: Implementing a Data. Version: Demo. Warehouse with Microsoft SQL Server 2012

Delivering Business Intelligence With Microsoft SQL Server 2005 or 2008 HDT922 Five Days

Upgrading Your SQL Server Skills to Microsoft SQL Server 2014

ACCESSING IBM iseries (AS/400) DB2 IN SSIS

Oracle Warehouse Builder 10g

MICROSOFT EXAM QUESTIONS & ANSWERS

SQL Server 2008 Administration

SQL SERVER TRAINING CURRICULUM

2933A: Developing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006

<Insert Picture Here> Extending Hyperion BI with the Oracle BI Server

SQL Server Training Course Content

AV TSS-05 Avantis.DSS 5.0 For Wonderware Intelligence

Microsoft SQL Server 2008 Bible

SQL Server Integration Services Using Visual Studio 2005

Data Integration Checklist

High-Volume Data Warehousing in Centerprise. Product Datasheet

Orchestrated IT in Action.

Expert PHP and MySQL. Application Desscpi and Development. Apress" Marc Rochkind

Cúram Business Intelligence Reporting Developer Guide

Data Warehouse Center Administration Guide

QAD Enterprise Applications. Training Guide Demand Management 6.1 Technical Training

There are three common ways to get data from Oracle into SQL Server:

SQL SERVER BUSINESS INTELLIGENCE (BI) - INTRODUCTION

Transcription:

SQL Server 2012 Integration Services Design Patterns Andy Leonard Matt Masson Tim Mitchell Jessica M. Moss Michelle Ufford

Contents J Foreword About the Authors About the Technical Reviewers Acknowledgments xviii xix xxi xxiii Chapter 1: Metadata Collection 1 Introducing SQL Server Data Tools 1 A Peek at the Final Product 1 SQL Server Metadata 3 Setting Up the Central Repository 4 The Iterative Framework 6 Metadata Collection 14 Summary 28 Chapter 2: Execution Patterns 29 Building the Demonstration SSIS Package 29 Debug Execution 30 Command-Line Execution 31 Execute Package Utility 31 The SQL Server 2012 Integration Services Service 32 Integration Server Catalogs 32 Integration Server Catalog Stored Procedures 33 vii

l CONTENTS Scheduling SSIS Package Execution 53 Scheduling an SSIS Package 53 Scheduling a File System Package 54 Running SQLAgent Jobs with the Custom Execution Framework 55 Running the Custom Execution Framework with SQL Agent 56 Metadata-Driven Execution 58 Execution from Managed Code 58 The Demo Application 58 ThefrmMain Form 59 Summary 69 Chapter 3: Scripting Patterns 71 The Toolset 71 Should I Use Script? 72 The Script Editor 72 Project Explorer 73 Full.NET Runtime 74 Compiler 74 The Script Task 75 The Script Component 77 Script Maintenance Patterns 78 Code Reuse 78 Copy/Paste 78 External Assemblies 78 Custom Tasks/Components 79 Source Control 79 Scripting Design Patterns 79 Connection Managers and Scripting 80 Using Connection Managers in the Script Task 81 Using Connection Managers in the Script Component 81 Variables 82

Variable Visibility 82 Variable Syntax in Code 83 Variable Data Types 84 Naming Patterns 85 Summary 85 Chapter 4: SQL Server Source Patterns 87 Setting up a Source 87 Selecting a SQL Server Connection Manager and Provider 88 AD0.NET 89 ODBC 90 OLE DB 91 Creating a SQL Server Source Component 92 Writing a SQL Server Source Component Query 94 ADO.NET Data Access 95 OLE DB Data Access 96 Waste Not, Want Not 97 Data Translations 97 Source Assistant 97 Summary 99 Chapter 5: Data Cleansing with Data Quality Services 101 Overview of Data Quality Services 101 Using the Data Quality Client 102 Using DQS with SSIS 107 Cleansing Data in the Data Flow 113 Handling the Output of the DQS Cleansing Transform 113 Performance Considerations 116 Approving and Importing Cleansing Rules 120 Summary 122 ix

Chapter 6: DB2 Source Patterns 123 DB2 Database Family 123 Selecting a DB2 Provider 124 Find Database Version 124 Pick Provider Vendor 125 Connecting to a DB2 Database 125 Querying the DB2 Database 128 DB2 Source Component Parameters 129 DB2 Source Component Dynamic Queries 130 Summary 132 Chapter 7: Flat File Source Patterns 133 Flat File Sources 133 Moving To SSIS! 134 Strong-Typing the Data 136 Introducing a Data-Staging Pattern 138 Variable-Length-Rows 141 Reading into a Data Flow 142 Splitting Record Types 143 Terminating the Streams 144 Header and Footer Rows 146 Consuming a Footer Row 146 Consuming a Header Row 149 Producing a Footer Row 151 Producing a Header Row 158 The Archive File Pattern 162 Summary 167 Chapter 8: Parallel Data Warehouse Patterns 169 PDW Architecture Overview 170 DWLoader vs. Integration Services 172 ETL vs. ELT 172 X

Installing the PDW Destination Adapter 174 The Data Source 175 The Data Flow 177 The Data Source The Data Transformation 178 179 The Data Destination 181 Multi-Threading 188 Summary 189 Chapter 9: XML Patterns 191 Using the XML Source 191 Dealing with Multiple Outputs 192 Making Things Easier with XSLT 198 Using a Script Component 201 Configuring the Script Component 201 Processing XML with XmlSerializer 206 Processing XML with XmlReader and LINQ to XML 207 Summary 209 Chapter 10: Expression Language Patterns 211 Getting to Know the Expression Language 211 What is Expression Language? 211 Why Use Expressions? 212 Language Essentials 213 Limitations 213 Putting Expression Language to Work 214 Package Expressions 214 Variable Expressions 215 Connection Managers 215 Project-level Connection Managers 217 Control Flow 217 Data Flow Expressions 220

2 CONTENTS Chapter 11: Data Warehouse Patterns 227 Incremental Loads 227 What Is an Incremental Load? 227 Why Incremental Loads? 227 The Slowly Changing Dimension 228 Incremental Loads of Fact Data 228 Incremental Loads in SSIS 228 Native SSIS Components 229 The Slowly Changing Dimension Wizard 232 The MERGE Statement 234 Change Data Capture (CDC) 237 Data Errors 242 Simple Errors 242 Missing Data 242 Coding to Allow Errors 245 Data Warehouse ETL Workflow 247 Dividing Up the Work 247 One Package=One Unit of Work 247 Summary 249 Chapter 12: Logging Patterns 251 Essentials of Logging 251 Why Logging? 251 Elements of Logging 252 Logging in SSIS 253 SSIS Catalog Logging 253 Package Logging 256 Custom Logging 258 What to Capture? 259 Logging Systems 260 Summary 260 xii

Chapter 13: Slowly Changing Dimensions 261 Slowly Changing Dimension Transform 261 Running the Wizard 262 Using the Transformations 266 Optimizing Performance 267 Third Party SCD Components 268 MERGE Pattern 269 Handling Type 1 Changes 270 Handling Type 2 Changes 271 Summary 271 Chapter 14: Loading the Cloud 273 Interacting with the Cloud 273 Incremental Loads to SQL Azure 274 Change Detection 274 New Rows (Only) 274 Building the Cloud Loader 275 Summary 278 Chapter 15: Logging and Reporting Patterns 279 Package Logging and Reporting 279 Setting Up Package Logging 280 Reporting on Package Logging 281 Design Pattern: Package Executions 281 Catalog Logging and Reporting 281 Setting Up Catalog Logging 281 Catalog Tables 283 Changing Logging Levels After the Fact 284 Design Patterns 285 Summary 289 xiii

Chapter 16: Parent-Child Patterns 291 Master Package Pattern 291 Assign the Child Package 292 Configure Parameter Binding 293 Dynamic Child Package Pattern 294 Child to Parent Variable Pattern 298 Summary 300 Chapter 17: Business Intelligence Markup Language 301 A Brief History of Business Intelligence Markup Language 301 Building Your First Biml File 302 Building a Basic Incremental Load SSIS Package 305 Adding Metadata 307 Specifying a Data Flow Task 308 Adding Transformations 308 Testing the Biml 314 Using Biml as an SSIS Design Patterns Engine 318 Time for a Test 324 Summary 326 Chapter 18: Configuration 327 Parameters 327 Configuring Your Package Using Parameters 329 Using the Parametrize Dialog 332 Creating Visual Studio Configurations 332 Specifying Entry Point Packages 334 Connection Managers 334 Parameter Configuration on the Server 335 Default Configuration 335 Server Environments 337 Default Parameter Values Using T-SQL 339 Package Execution through the SSIS Catalog 339 xiv

Parameters with DTEXEC 341 Projects on the File System 342 Projects in the SSIS Catalog 343 Dynamic Configurations 344 Configuring from a Database Table 344 Setting Values using a Script Task 348 Dynamic Package Executions 348 Summary 350 Chapter 19: Deployment 351 Project Deployment Model 351 SSIS Catalog 352 Deployment Methods 354 Deployment from the Command Line 355 Deployment Using Custom Code 356 Deployment Using PowerShell 357 Deployment Using SQL 358 Package Deployment Model 359 Summary 360 Chapter 20: Estimating ETL Projects 361 What is being measured? 361 Why estimate? 361 Challenges 362 It's difficult because it requires communication 362 It's difficult because it requires guesswork 363 It's difficult because it relies on technology 363 The secret to estimating ETL project timelines is 364 Don't forget the little things 364 Plan for the unexpected 365 XV

Know the personalities involved 366 Learn to do it right by doing it wrong 366 When the timeline slips, communicate early and often 366 Summary 366 Appendix A: Evolution of an SSIS Framework 367 Starting in the Middle 367 Introducing SSIS Applications A Note About Relationships 376 378 Retrieving SSIS Applications in T-SQL 381 Retrieving SSIS Applications in SSIS 384 Monitoring Execution 386 Building Application Instance Logging 387 Building Package Instance Logging 393 Building Error Logging 397 Reporting Execution Metrics 406 Summary 420 Index 423 xvi