Cool Tricks to Pull from Your SSIS Hat Julie Smith.

Slides:



Advertisements
Similar presentations
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Advertisements

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.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Automating SQL Buildouts With Hyper-V and SQL Server 2008 R2 Robert L Davis, Sr. DBA, Microsoft Corp.
The Dirty Dozen: PowerShell Scripts for the Busy DBA DBA-237 Aaron
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Error Handling in SSIS Reza Rad SQL Server MVP, Author, DW / BI Architect.
Top 10 SSIS Best Practices Tim Mitchell Artis Consulting The World’s Largest Community of SQL Server Professionals.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Wouter Smit About the Speaker Wouter has been working in the data warehousing field for more than 10 years MCITP Professional Database Administrator.
INTELLIGENT DATA SOLUTIONS SSIS Tips and Tricks Bradley Schacht Blog:
SQL Server 2005 Integration Services Mike Taulty Developer & Platform Group Microsoft Ltd
SSIS Over DTS Sagayaraj Putti (139460). 5 September What is DTS?  Data Transformation Services (DTS)  DTS is a set of objects and utilities that.
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 ◦
Introduction to Matlab & Data Analysis
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
1 Databound Controls. 2 Objectives You will be able to use design time data binding to display and update SQL Server database data without writing any.
Understanding SSIS Control Flows Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
DTS Conversion to SSIS Conversion Best Practices Mike Davis
(Chapter 10 continued) Our examples feature MySQL as the database engine. It's open source and free. It's fully featured. And it's platform independent.
SQL Server User Group Meeting Reporting Services Tips & Tricks Presented by Jason Buck of Custom Business Solutions.
Page 1 SQL Server Myths XV ENCONTRO DA COMUNIDADE SQLPORT Rui Ribeiro MCITP 2011/08/16.
Oracle Data Integrator Procedures, Advanced Workflows.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
DAT 360: DTS in SQL Server 2000 Best Practices Euan Garden Group Manager, SQL Server Microsoft Corporation.
Integration Services in SQL Server 2008 Allan Mitchell SQL Server MVP.
Extending SQL Server Integration Services Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 15 Introduction to PL/SQL. Chapter Objectives  Explain the benefits of using PL/SQL blocks versus several SQL statements  Identify the sections.
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
1 Integration Services in SQL Server 2008 Allan Mitchell – SQLBits – Oct 2007.
ADAPTING YOUR ETL SOLUTION TO USE SSIS 2012 Presentation by Devin Knight
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
implicit and an explicit cursor
IT System Administration Lesson 3 Dr Jeffrey A Robinson.
Batch Jobs Using the batch job functions. Use [Bulk Changes][Batch Job Utility] to start. Read the information panel. Check with TAMS Technical Support.
Python: Building Geoprocessing Tools David Wynne, Ghislain Prince.
MPUG Global December 2 nd 2004 Portland, Oregon Brian Smith, Microsoft Corporation.
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.
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
Brian Knight Founder Pragmatic Works BIN207 About the Speaker Brian is a SQL Server MVP Founder of Pragmatic Works Co-founder of SQLServerCentral.com.
Copyright 2015 Varigence, Inc. Unit and Integration Testing in SSIS A New Approach Scott @varigence.
Bret Stateham Owner, Net Connex blogs.netconnex.com
Business Connectivity Services BCS (Old BDC) New read and write access to external data –Line-of-business (LOB) systems –Web services –Databases –Other.
Pulling Data into the Model. Agenda Overview BI Development Studio Integration Services Solutions Integration Services Packages DTS to SSIS.
Advanced Analysis Services Security Chris Webb Crossjoin Consulting Limited.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
Upgrade on Windows 7. DownloadSoftware Download Software from link provided in Webliography: e/
Practical MSBI(SSIS, SSAS,SSRS) online training. Contact Us: Call: Visit:
During Recording 1. Click Record to launch the slideshow. 2. Check the microphone input level. When ready, select the Click to begin recording button or.
Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create.
DBI317. Enhanced Usability Improved Deployment, Configuration and Management Improved deployment, configuration and management of SSIS projects  SSIS.
Dept. of Information Systems St. Francis Xavier University
SSIS Templates, Configurations & Variables
ASP.NET Programming with C# and SQL Server First Edition
Presented By: Jessica M. Moss
Data Virtualization Tutorial: Introduction to SQL Script
Query Tuning without Production Data
Visual Studio 2010 Database Projects
CCA Skill Certification
Auditing in SQL Server 2008 DBA-364-M
SSIS Parameters vs. Configurations
Getting To Know Your Indexes
Making PowerShell Useful
Start testing your SSIS packages with ssisUnit
Governing Your Enterprise with Policy-Based Management
Presentation transcript:

Cool Tricks to Pull from Your SSIS Hat Julie Smith

Cool Tricks to Pull from Your SSIS Hat Julie Smith Business Intelligence Consultant at Key2 Consulting in Atlanta, GA With Audrey Hammonds the 11 Years Experience as ETL Developer

Digging into more advanced SSIS Techniques—Case Studies Step through some real life scenarios and learn some ways to use: Variables The SSIS Expression Language For Each Loops ADO Objects (Object Variables) Building Blocks for Frameworks!

In the Beginning… There was a connection manager There was a data flow task They were hardcoded (their value was Constant) It was good……

Until realized your hand was getting tired from all the right clicking as your requirements got more complicated. –“Tired of having to run your package then change all the configurations? –“Tired of doing it again next time?” –“Try Some Cool SSIS Tricks”

What is a Variable (programming)? From Wikipedia: In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents. A variable name in computer source code is usually associated with a data storage location and thus also its contents, and these may change during the course of program execution.computer programmingsource codedata storage location

In SSIS, How do you change the value of a Variable? With an Execute SQL Task With an SSIS Expression Through configuration of For Each Loop With a Script Task or Component *not an exhaustive list.

Where we’ll be in next hour… Windows Explorer SQL Server Management Studio BIDS –What we’ll be doing (SSIS Functions include) : Data Flow (Table to Text File) Validate XML Task If we have time--File System Tasks

Before we Get to the Demos: Take a tour to familiarize ourselves with some key BIDS windows. Variables Window Properties and the Expression box. (Go to Tour)

Scenario 1 Business Problem: You have a regular job which exports rows from the GeospatialWidgets table into a text file. Often, the result set is empty, and you wish you knew how to prevent the creation of the empty file. We’re going to use a variable, the SSIS expression language, a precedence constraint, dynamically affecting properties.

Solution 1 Step 1: Create Variable called “rowcount” Step 2: Use Execute SQL task to capture the rowcount of table inside that variable. Do this 2 ways: 1. ResultSet method/ OLE DB connection. 2. Output Parameter of Sproc ADO.Net connection

Solution 1 continued Step 3--Use SSIS Expression Language to Either 1. Prevent the data flow’s execution using Precedence Constraints 2. Disable the data flow with the Disable Property Both ways mean --when “rowcount” = 0, then data flow does not execute.

Demo 1

Gotchas! Result Name has to be Changed (named). Ordinal number starting with 0 (zero)—or parameter name. This is not intuitive. Caution with Disable Property Once switched, it cannot be unswitched during execution of the package. Variable value of User:rowcount has to be non-zero value at start of execution, or it will disable itself.

Scenario 2 Business Problem: You have one file directory which will contain many XML files. Files must be validated and then processed. You will not process all the files in the directory with one run of the job. So you need to be able to “cherry pick” the files out of the directory based on other criteria.

Solution 2: Use a SQL table as a “Master List”. Table has “processed” flag (bit) for filtering. Use a Variable of ADO Object data type to hold the filtered “queue” of files to process from the Master List. Use For Each Loop in SSIS with the ADO Object as the Enumerator. With each loop, each row gets processed. Each row contains the fully qualified filename of one XML file

ADO Objects SSIS IDFileNameProcessed 1C:\file1.xml1 2C:\file2.xml0 3C:\File3.xml0 IDFileName 2C:\file2.xml 3C:\File3.xml The table: MyFileQueueTable The Query: Select ID, FileName from MyFileQueueTable where Processed = 0 (Creates a Runtime queue in SSIS) I’m a table. I live in SQL Server I’m an ADO Object, don’t I look like a table?

Demo 2

Gotchas! Value of file has to be real. It’s Confusing-- see next slide. Error Handling has to be implemented otherwise package fails on XML Failure. XML Failure in this case should not halt the package.

Journey of value of XML File. 1.XML validation task uses *”filename.xml” File Connection as Source. 2.*”filename.xml” has its Connection String dynamically populated by the value of the vFileName variable with an Expression in its Properties

Journey of value of XML File continued. 3.The vFileName has its value iteratively changed as the For Each Loop processes the ADO Object named “ADOValidate”. 4.The “ADOValidate” Object of the For Each loop gets its values from the resultset of the Execute SQL Task

Scenario 3: Business Problem A: In previous scenario, we have possibility of thousands of clients importing 2 types of files into the same database. Want to segregate their archived files by type of file and client. Don’t want to manually create these directories. Create task that will take the Client and filetype and create the properly named and located directory. **Credit to Wrox book, Veerman, Knight et al.

Scenario 3 continued Business Problem B: We also want to create auditing data. We write back to the Queue table with information on the execution Succeed? Fail? If it failed, why?

Solution 3 Use Expression Language to Create File Directories with File Task. (A) Move XML files from ToBeProcessed to Error/Client if necessary. (A) Use Execute SQL Task with variables to dynamically update the Queue table with relevant processing information. (B)

Demo 3

Gotchas! “\” is an Escape in SSIS Expression Language. In Production, Write Permissions.

Summary— Variables – give us a placeholder to work magic in. –For Each Loops and ADO Object Variables are VERY USEFUL Expression Language – is the magic

Cool Tricks to Pull from Your SSIS Hat Julie Smith Heartfelt Thanks to: –Audrey Hammonds –Kenneth Wright –SQL Rally Organizers –SQL Rally Sponsors –My Key2 Colleagues –Aaron Nelson and Rob Volk –Monty Python (Eric Idle, Graham Chapman, Terry Jones, Terry Gilliam, John Cleese, Michael Palin)

Cool Tricks to Pull from Your SSIS Hat Julie Smith Thanks for coming! Check out Also blog at:

Please Complete the Evaluation Form Pick up your evaluation form: In each presentation room Drop off your completed form Near the exit of each presentation room At the registration area Session Title 30 Sponsored by Dell

THANK YOU! For attending this session and PASS SQLRally Orlando, Florida Session Code | Session Title 31 Sponsored by Dell