ISQS 3358, Business Intelligence Extraction, Transformation, and Loading Zhangxi Lin Texas Tech University 1.

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)
Little Used, but Powerful Features with GP Cathy Fregelette, CPA, PMP Practice Manager BroadPoint Technologies September 20, 2012.
Data Base. Objective Become familiar with database terminology. Create a project to display data for a single database table. Use a DataGrid control.
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.
ISQS 6339, Data Management and Business Intelligence Cubism – Measures and Dimensions Zhangxi Lin Texas Tech University 1.
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Moving Data Lesson 23. Skills Matrix Moving Data When populating tables by inserting data, you will discover that data can come from various sources.
Technical BI Project Lifecycle
SQL Server 2005 Integration Services Dave Glover Microsoft Australia
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Module 11: Data Transport. Overview Tools and functionality in Oracle and their equivalents in SQL Server for: Data transport out of the database Data.
ETL Design and Development Michael A. Fudge, Jr.
ETL By Dr. Gabriel.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
ISQS 3358, Business Intelligence Creating Data Marts Zhangxi Lin Texas Tech University 1.
Implementing a Data Warehouse with SQL 2012
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.
Creating Data Marts from COBOL Files (ISAM to RDBMS)
Classroom User Training June 29, 2005 Presented by:
ISV Innovation Presented by ISV Innovation Presented by Business Intelligence Fundamentals: Data Loading Ola Ekdahl IT Mentors 9/12/08.
 Nate Locklin ◦ Database Analyst, PPG Industries ◦  Steve Tirone ◦ Data Warehouse Analyst, Amerinet ◦
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
PASS 2003 Review. Conference Highlights Keynote speakers Gordon Mangione Alan Griver Bill Baker Technical sessions Over 120 sessions across 4 tracks Dev.
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.
Populating a Data Warehouse. Overview Process Overview Methods of Populating a Data Warehouse Tools for Populating a Data Warehouse Populating a Data.
ISQS 6339, Data Management and Business Intelligence Cubism – Bells and Whistles Zhangxi Lin Texas Tech University 1.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
DAT 360: DTS in SQL Server 2000 Best Practices Euan Garden Group Manager, SQL Server Microsoft Corporation.
Today’s Agenda Chapter 7 Review for Midterm. Data Transfer Tools DTS (Data Transformation Services) BCP (Bulk Copy Program) BULK INSERT command Other.
ISQS 3358, Business Intelligence Cubism – Measures and Dimensions Zhangxi Lin Texas Tech University 1.
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
7 Strategies for Extracting, Transforming, and Loading.
Building Data Integration Solutions with Integration Services Donald Farmer Group Program Manager Microsoft Corporation.
02 | Data Flow – Extract Data Richard Currey | Senior Technical Trainer–New Horizons United George Squillace | Senior Technical Trainer–New Horizons Great.
SSIS – Deep Dive Praveen Srivatsa Director, Asthrasoft Consulting Microsoft Regional Director | MVP.
Interactions & Automations
Creating Simple and Parallel Data Loads With DTS.
MIS 451 Building Business Intelligence Systems Data Staging.
Aggregator Stage : Definition : Aggregator classifies data rows from a single input link into groups and calculates totals or other aggregate functions.
ISQS 3358, Business Intelligence Extraction, Transformation, and Loading Zhangxi Lin Texas Tech University 1.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Pulling Data into the Model. Agenda Overview BI Development Studio Integration Services Solutions Integration Services Packages DTS to SSIS.
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.
©NIIT BCP and DTS Implementing Stored Procedures Lesson 2A / Slide 1 of 23 Objectives In this lesson, you will learn to: Perform bulk copy using the BCP.
What's NEW in SQL 2005 Integration Services Matthew Stephen SQL Server Specialist
PROJECT ORIENTED ONLINE TRAINING ON MSBI (IS,AS,RS)
Zhangxi Lin Texas Tech University
Data Warehousing/Loading the DW—Topics
Zhangxi Lin Texas Tech University
Zhangxi Lin Texas Tech University
IBM DATASTAGE online Training at GoLogica
Data Warehouse.
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Data Warehousing/Loading the DW—Topics
Best Practices in Higher Education Student Data Warehousing Forum
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

ISQS 3358, Business Intelligence Extraction, Transformation, and Loading Zhangxi Lin Texas Tech University 1

Outline Integration Services Learn by doing Package development tools 2

ETL Topics Dimension Processing ◦ Extract changed row from the operational database ◦ Handling slowly changing dimensions ◦ De-duplication and fuzzy transforms Fact Processing ◦ Extract fact data from the operational database ◦ Extract fact updates and deletes ◦ Cleaning fact data ◦ Checking data quality and halting package execution ◦ Transform fact data ◦ Surrogate key pipeline ◦ Loading fact data ◦ Analysis services processing Integrating all tasks 3

Automating your routine information processing tasks Your routine information processing tasks ◦ Read online news at 8:00a and collect a few most important pieces ◦ Retrieve data from database to draft a short daily report at 10a ◦ View and reply s and take some notes that are saved in a database ◦ View 10 companies’ webpage to see the updates. Input the summaries into a database ◦ Browse three popular magazines twice a week. Input the summaries into a database ◦ Generate a few one-way frequency and two-way frequency tables and put them on the web ◦ Merge datasets collected by other people into a main database. ◦ Prepare a weekly report using the database and at 4p every Monday, and publish it to the internal portal site. ◦ Prepare a monthly report at 11a on the first day of a month, which must be converted into a pdf file and uploaded to the website. Seems there are many things are on going. How to handle them properly in the right time? ◦ Organizer – yes ◦ How about regular data processing tasks? 4

SQL Server Integration Services (SSIS) The data in data warehouses and data marts is usually updated frequently, and the data loads are typically very large. Integration Services includes a task that bulk loads data directly from a flat file into SQL Server tables and views, and a destination component that bulk loads data into a SQL Server database as the last step in a data transformation process. An SSIS package can be configured to be restartable. This means you can rerun the package from a predetermined checkpoint, either a task or container in the package. The ability to restart a package can save a lot of time, especially if the package processes data from a large number of sources. 5

What can you do with SSIS? To load the dimension and fact tables in the database. If the source data for a dimension table is stored in multiple data sources, the package can merge the data into one dataset and load the dimension table in a single process, instead of using a separate process for each data source. To update data in data warehouses and data marts. The Slowly Changing Dimension Wizard automates support for slowly changing dimensions by dynamically creating the SQL statements that insert and update records, update related records, and add new columns to tables. To process Analysis Services cubes and dimensions. When the package updates tables in the database that a cube is built on, you can use Integration Services tasks and transformations to automatically process the cube and to process dimensions as well. To compute functions before the data is loaded into its destination. If your data warehouses and data marts store aggregated information, the SSIS package can compute functions such as SUM, AVERAGE, and COUNT. An SSIS transformation can also pivot relational data and transform it into a less-normalized format that is more compatible with the table structure in the data warehouse. 6

SSIS Architecture 7

Control Flow Bulk Insert task: Perform a fast load of data fro flat files into a target table. Good for loading clean data. Execute SQL task: Perform database operations, creating views, tables, or even databases. Query data or metadata File Transfer Protocol and File System tasks: transfer files or sets of files. Execute Package, Execute DTS2000 Package, and Execute Process tasks: Break a complex workflow into smaller ones, and define a parent or master package to execute them. Send Mail task: sends an message. 8

Control Flow (cont’d) Script and ActiveX Script tasks: Perform an endless array of operations that are beyond the scope of the standard tasks. Data Mining and Analysis Service Processing tasks: Launch processing on SSAS dimensions and databases. Use SSAS DDL task to create new Analysis Services partitions, or perform any data definition language operation. XML and Web Services tasks Message Queue, WMI Data Reader, and WMI Event Watcher tasks: Help to build an automatic ELT system. ForEach Loop, For Loop, and Sequence containers: Execute a set of tasks multiple times Data Flow tasks 9

Data Flow Task Data Flow task is a pipeline in which data is picked up, processed and written to a destination. Avoids I/O, which provided excellent performance Concepts ◦ Data sources ◦ Data destinations ◦ Data transformations ◦ Error flows 10

Some Data transformation Steps Sort and Aggregate transforms Conditional Split and Multicast transforms Union All, Merge Join, and Lookup transforms Slowly Changing Dimension transform OLE DB Command transform Row Count and Audit transforms Pivot and Unpivot transforms Data mining Model Training and data Mining Query transforms Term extraction and Term Lookup transforms File Extractor and File Injector transforms 11

Dynamic Packaging Modifying the actions that a package takes when it’s executing. SSIS implements a rich expression language that is used in control flow and also in data flow transform. Concepts ◦ Expressions. Uses an expression language, simple. ◦ Variables. Can be defined within a package. Can be scoped to any object: package-wide, within a container, a single task, etc. ◦ Configurations. Can overwrite most of the settings for SSIS objects by supplying a configuration file at runtime. 12

Using SSIS Import and Export Wizard Importing or exporting a flat file into SQL Server 2005 ◦ Choose Start | Run. In the Run dialog box’s Open field, type DTSWizard; click OK button to open SQL Server Import and Export Wizard’s Welcome page. No need to have SQL Server to run the SSIS Import and Export Wizard. 13

SQL Server Integration Services The hierarchy of SSIS ◦ Project -> Package -> Control flow -> Data flow Package structure ◦ Control flow ◦ Data flow ◦ Event handler ◦ Package explorer ◦ Connection tray Features ◦ Event driven ◦ Layered ◦ Drag-and-drop programming ◦ Data I/O definitions are done using Connection Managers 14

Three Layer Structure of Integration Services 15 Control Flow Data Flow Event Handler

Snowflake Schema of the Data Mart 16 ManufacturingFact DimProduct DimProductSubType DimProductType DimBatch DimMachine DimMachineType DimMaterial DimPlant DimCountry AggregateSQL Coding

Exercise 4: Populate Maximum Miniatures Manufacturing Data Mart Dimensions Preparation: Data sources and destination definition Loading dimensions ◦ ProductType ◦ ProductSubType ◦ Product ◦ Country ◦ Plant (using SQL Command) ◦ Material (using SQL Command, Aggregate item) ◦ MachineType (copied from the Material loading task) ◦ Machine (copied from the MachineType loading task) Note: DimBatch and the fact table will be loaded in the next exercise. Debugging ◦ Step by step ◦ Understand the error messages ◦ Watch database loading status See more detailed Guidelines of this exerciseGuidelines 17

Codes for data flows The following codes are used to selectively retrieve data from the source for the destination database Code for DimPlant loading SELECT LocationCode, LocationName, CountryCode From Locations WHERE LocationType = 'Plant Site' Code for DimMaterial loading SELECT AssetCode, AssetName, AssetClass, LocationCode, Manufacturer, DateOfPurchase, RawMaterial FROM CapitalAssets WHERE AssetType = 'Molding Machine' 18

Package Items Data flow Task – main task Control Flow Items ◦ For Loop Container, Foreach Loop Container, Sequence Container Data Preparation Tasks ◦ File System Task, FTP Task, Web Service Task, XML Task Work Flow Tasks ◦ Execute Package Task, Execute DTS 2000 Package Task, Execute Process Task, Message Queue Task, Send Mail Task, WMI Data Reader Task, WMI Event Watcher Task SQL Server Tasks ◦ Bulk Insert Task, Execute SQL task Scripting Tasks ◦ ActiveX Script Task, Script Task Analysis Services Tasks ◦ Analysis Services Processing Task, Analysis Services Execute DDL Task, Data Mining Query Task Transfer Tasks ◦ Transfer Database Task, Transfer Error Messages Task, Transfer Logins Task Transfer Objects Task, Transfer Stored Procedures Task Maintenance Tasks Custom Tasks 19

Connection managers Excel Connection Manger File Connection Manger Flat File Connection Manager FTP Connection Manager HTTP Connection Manager ODBC Connection Manager OLE DB Connection Manager ADO Connection Manager – for legacy applications using earlier versions of programming languages, such as VB 6.0 ADO.NET Connection Manager – Access to Microsoft SQL Server and data sources exposed through OLE DB and XML by using a.NET provider Microsoft.NET Data Provider for mySQL Business Suite – access to SAP server and enables to execute RFC/NAPI commands and select queries against SAP tables Design-time data source objects can be created in SSIS, SSAS and SSRS projects 20

Container Managers Foreach Loop Container For Loop Container Sequence Container 21

Data Flow Components Data flow sources Data flow destinations Data transformations 22

Different Types of ETL Control Flows With data flows, e.g. ◦ Import data ◦ Database updates ◦ Loading SCD ◦ Database cleansing ◦ Aggregating data Without data flows, e.g. ◦ Downloading zipped files ◦ Archiving downloaded files ◦ Reading application log ◦ Mailing opportunities ◦ Consolidating workflow package 23

Data Flow for Updating Database 24

Data Flow for Loading Slowly Changing Dimension 25

Control Flow for Importing Expanded Files 26

De-Duplication Two common situations: person, and organization SSIS provides two general-purpose transforms helping address data quality and de-duplication ◦ Fuzzy Lookup ◦ Fuzzy Grouping 27

ETL System Debugging Most frequently encountered errors ◦ Data format error: The database table’s data type does not match the input data’s format  Reason 1: Flat Text file uses varchar(50), or string[DT_STR] format; Excel file uses nvarchar format  Reason 2: You defined the database using different formats, which could be caused by the imported data set.  Solution: A Data Conversion data transformation node can be used for changing the format ◦ SQL Server system error: Even though you did things correctly you could not get through.  Solution: the easiest way to solve this problem is to redo the ETL flow. 28

ETL How-to Problems How to use Merge function of Data Transformation to join datasets from two tables into one. How to split a dataset to two tables How to remove duplicated rows in a table. How to detect the changes of the rows in the data sources and extract the updated rows into a table in the data warehouse. How to load multiple datasets with similar structure into a table Reference: SQL Server 2005 Integration Services, McGraw Hill Osborne, 2007SQL Server 2005 Integration Services 29

Exploring Features of SQL Server ETL System Data Source and Data destination ◦ Flat File Data flow transformation ◦ Aggregate ◦ Derived Column ◦ Data Conversion ◦ Sort 30

Exercise 5: Exploring Features of SQL Server ETL System Data Set: ◦ Source: Commrex_2008, D5.txt (in the shared directory under \OtherDatasets) ◦ Destination: Flat file, Excel file, OLE DB file Data flow transformation ◦ Aggregate (Use D5.txt, and aggregate the data with regard to UserID) ◦ Derived Column (Use Commrex_2008, and create a new column “NewID”) ◦ Data Conversion (Use Commrex_2008, and convert data type of some columns, such as UserID, Prop_ID) ◦ Sort (use D5.txt, sort ascending with ID, Date, Time) 31