Populating a Data Warehouse. Overview Process Overview Methods of Populating a Data Warehouse Tools for Populating a Data Warehouse Populating a Data.

Slides:



Advertisements
Similar presentations
Populating Data Warehouse Structures Examining the Star Schema Dimension Tables Dimension Table Fact Table Sales Star Schema.
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.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Moving Data Lesson 23. Skills Matrix Moving Data When populating tables by inserting data, you will discover that data can come from various sources.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Week 5 – Chap. 5 Data Transfer DBAs often must transfer data to and from text files, Excel spreadsheets, Access, Oracle or other SQL Server databases This.
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.
Module 9: Transferring Data. Overview Introduction to Transferring Data Tools for Importing and Exporting Data in SQL Server Introduction to DTS Transforming.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Module 2: Using Transact-SQL Querying Tools. Overview SQL Query Analyzer Using the Object Browser Tool in SQL Query Analyzer Using Templates in SQL Query.
Overview What is SQL Server? Creating databases Administration Security Backup.
SSIS Over DTS Sagayaraj Putti (139460). 5 September What is DTS?  Data Transformation Services (DTS)  DTS is a set of objects and utilities that.
Copyright © 2006, SAS Institute Inc. All rights reserved. Enterprise Guide 4.2 : A Primer SHRUG : Spring 2010 Presented by: Josée Ranger-Lacroix SAS Institute.
Overview of SQL Server Alka Arora.
3 Chapter Three Administering and Configuring SQL Server 2000.
SQL Server Integration Services (SSIS) Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server (MVP) Microsoft Certified Technology Specialist.
9 Chapter Nine Extracting and Transforming Data with SQL Server 2000.
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Module 11: Programming Across Multiple Servers. Overview Introducing Distributed Queries Setting Up a Linked Server Environment Working with Linked Servers.
DTS Conversion to SSIS Conversion Best Practices Mike Davis
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
Module 1: Exploring Replication. Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
Oracle 11g DATABASE DEVELOPMENT LAB1. Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations.
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,
DataMAPPER - Applied Database Tech. 이화여대 과학기술대학원 석사 3 학기 992COG08 김지혜.
1 © 1999 Microsoft Corp.. Microsoft Repository Phil Bernstein Microsoft Corp.
Today’s Agenda Chapter 7 Review for Midterm. Data Transfer Tools DTS (Data Transformation Services) BCP (Bulk Copy Program) BULK INSERT command Other.
Siebel 8.0 Module 2: Overview of EIM Processing Integrating Siebel Applications.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
DW-2: Designing a Data Warehousing System 용 환승 이화여자대학교
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.
02 | Data Flow – Extract Data Richard Currey | Senior Technical Trainer–New Horizons United George Squillace | Senior Technical Trainer–New Horizons Great.
Creating Simple and Parallel Data Loads With DTS.
Backup Tables in SQL Server. Backup table method Cape_Codd database is used in this example 1.Righ click the database that contains the table you want.
Advanced Database & Client Server Introduction to MS SQL Server 2000 and Transact SQL -
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Practical MSBI(SSIS, SSAS,SSRS) online training. Contact Us: Call: Visit:
©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.
Introduction to Structured Query Language (SQL) By Techandmate.comTechandmate.com Learn SQL Server With US.
Module 5: Joining Multiple Tables. Overview Using Aliases for Table Names Combining Data from Multiple Tables Combining Multiple Result Sets.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
PROJECT ORIENTED ONLINE TRAINING ON MSBI (IS,AS,RS)
Module 1: SQL Server Overview
Managing, Storing, and Executing DTS Packages
Miscellaneous Excel Combining Excel and Access.
SQL and SQL*Plus Interaction
Phil Bernstein Microsoft Corp.
Chapter 10 ADO.
Contents Preface I Introduction Lesson Objectives I-2
Metadata The metadata contains
Database SQL.
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:

Populating a Data Warehouse

Overview Process Overview Methods of Populating a Data Warehouse Tools for Populating a Data Warehouse Populating a Data Warehouse by Using DTS

 Process Overview Validate, Gather,Transform Populate Data Distribute Make Data Consistent Data WarehouseData Sales Service Other Data Marts Source OLTP Systems Temporary Data Staging AreaDataWarehouse Sales Data Hardware Data Oracle SQLServer Other

Validating Data Validate and Correct Data at the Source Before You Import It Determine and Correct Processes That Invalidate Data Save Invalid Data to a Log for Review

Making Data Consistent Data Can Be Inconsistent in Several Ways: Data in each source is consistent, but you want to represent it differently in the data warehouse Data is represented differently in different sources You Can Make Data Consistent by: Translating codes or values to readable strings Converting multiple versions of the same information into a single representation

Transforming Data Transform Change Combine Calculate buyer_namebuyer_name Barr, Adam Chai, Sean O’Melia, Erin... reg_idreg_id total_salestotal_sales buyer_namebuyer_name Barr, Adam Chai, Sean O’Melia, Erin... reg_idreg_id total_salestotal_sales buyer_namebuyer_name Barr, Adam Chai, Sean O’Melia, Erin... price_idprice_id qty_idqty_id buyer_namebuyer_name Barr, Adam Chai, Sean O’Melia, Erin... reg_idreg_id II IV VI... total_salestotal_sales buyer_namebuyer_name Barr, Adam Chai, Sean O’Melia, Erin... price_idprice_id qty_idqty_id total_salestotal_sales buyer_firstbuyer_first Adam Sean Erin... buyer_lastbuyer_last Barr Chai O’Melia... reg_idreg_id total_salestotal_sales

Methods of Populating a Data Warehouse Select the Method of Populating a Data Warehouse That Suits Your Business Needs Method 1: Validate, combine, and transform data in a temporary data staging area Method 2: Validate, combine, and transform data during the loading process Migrate Data During Periods of Relatively Low System Use

 Tools for Populating a Data Warehouse What Is the Appropriate Tool to Use Transact-SQL Query Distributed Query bcp Utility and the BULK INSERT Statement DTS

What Is the Appropriate Tool to Use Format of Source and Destination Data Location of Source and Destination Data Import or Export of Database Objects Frequency of Data Transfer Interface Preference Tool Performance

Transact-SQL Query FullNameFullName Johnson, Steve Smith, Douglas Wilson, Les Salinger, Paul CustomerSummaryCustomerFirstNameFirstName Steve LastNameLastName Johnson Douglas Smith Les Wilson Paul Salinger USE northwind_mart SELECT Lastname + ', ' + Firstname As Fullname INTO CustomerSummary FROM Northwind.dbo.Customer USE northwind_mart SELECT Lastname + ', ' + Firstname As Fullname INTO CustomerSummary FROM Northwind.dbo.Customer

Distributed Query USE northwind_mart SELECT productname, companyname INTO item_dim FROM StockServer.sales.dbo.products p JOIN AccountingServer.sales.dbo.suppliers s ON p.supplierid = s.supplierid USE northwind_mart SELECT productname, companyname INTO item_dim FROM StockServer.sales.dbo.products p JOIN AccountingServer.sales.dbo.suppliers s ON p.supplierid = s.supplierid Sales Products Table Sales AccountingServerStockServer Local SQL Server Suppliers Table Item_Dim Table

bcp Utility and the BULK INSERT Statement BULK INSERT Accounting.dbo.orders FROM 'C:\ordersdir\orderstble.dat' WITH ( DATAFILE TYPE = 'char' FIELDTERMINATOR = '|', ROWTERMINATOR = '|\n') BULK INSERT Accounting.dbo.orders FROM 'C:\ordersdir\orderstble.dat' WITH ( DATAFILE TYPE = 'char' FIELDTERMINATOR = '|', ROWTERMINATOR = '|\n') BCP accounting.dbo.orders in Orderstbl.dat –c –t, -r \n –Smysqlserver –Usa –Pmypassword BCP accounting.dbo.orders in Orderstbl.dat –c –t, -r \n –Smysqlserver –Usa –Pmypassword bcp Utililty BULK INSERT Statement

DTS When to Use DTS DTS Data Source and Destination Types OLE DB ODBC ASCII text file DTS Tools DTS Import and Export wizards DTS Designer dtsrun utility Custom HTML Spreadsheet

 Populating a Data Warehouse by Using DTS Building a DTS Package Transforming Data by Using an ActiveX Script Transforming Data by Using a Lookup Query Defining Transactions Tracking Data Lineage Creating a DTS Package Programmatically

 Building a DTS Package Mapping Source and Destination Data Defining Data Transformation Tasks Creating and Saving a DTS Package Executing a DTS Package Scheduling and Securing a DTS Package

Mapping Source and Destination Data Mapping Columns Decide which columns to copy Choose the columns in the target database that map to the source columns Mapping Data Types Specify transformation rules Specify levels of data conversion

Defining Data Transformation Tasks DTS Packages Contain Tasks A Task Can: Execute a Transact-SQL statement Execute a script Launch an external application Transfer SQL Server 7.0 objects Execute or retrieve results from a DTS package

Creating and Saving a DTS Package Creating a DTS Package By using DTS wizards By using DTS Designer By using a COM interface exposed by DTS Saving a DTS Package COM-structured storage file Microsoft Repository SQL Server msdb database

Executing a DTS Package You Can Execute a DTS Package by Using SQL Server Enterprise Manager or dtsrun Command Prompt Utility File Storage Location Determines the dtsrun Syntax dtsrun /sAccounts /uJose /nOrdersImport

Scheduling and Securing a DTS Package Scheduling a DTS Package Use DTS Import or DTS Export wizards when you save the DTS package to the msdb database Use SQL Server Enterprise Manager when you use the dtsrun command prompt utility Implementing DTS Package Security Login permissions Owner and user passwords

Demonstration: Transferring Data by Using DTS

Transforming Data by Using an ActiveX Script Why Use an ActiveX Script How to Use an ActiveX Script Define a function to contain the transformation script Specify the destination column Specify the source columns Use operators and VBScript or JScript functions and control-of-flow statements Set the return code value for the function How to Handle Errors with Return Codes

Examples of ActiveX Scripts FullNameFullName Johnson, Steve Smith, Douglas Wilson, Les Salinger, Paul CustomerSummaryCustomerFirstNameFirstName Steve LastNameLastName Johnson Douglas Smith Les Wilson Paul Salinger Function Main() DTSDestination(“FullName”) = DTSSource(“Lastname”) + “, ” + DTSSource(“Firstname”) Main = DTSTransformStat_OK End Function Function Main() DTSDestination(“FullName”) = DTSSource(“Lastname”) + “, ” + DTSSource(“Firstname”) Main = DTSTransformStat_OK End Function

Demonstration: Transforming Data by Using an ActiveX Script

Transforming Data by Using a Lookup Query Customer_dimCustomer_dim Name D. Smith L. Wilson P. Salinger State Florida Wyoming Arkansas Destination Data Source DataCustomer_sourceCustomer_source Name D. Smith L. Wilson P. Salinger State FL WY AR Lookup Table State_lookupState_lookup Abbreviation FL WY AR State Florida Wyoming Arkansas Transform

Implementing a Lookup Query Set Up Connections to Source, Destination, and Lookup Tables Create a Task, and Specify the Source and Destination Add a Lookup Query Definition Map the Source and Destination Columns, and Call the Lookup Query from the ActiveX Script

Defining Transactions You Specifically Must Add a Step or Task to the Transaction You Can Specify When a Transaction Commits DTS Only Supports One Transaction Per Package MS DTC Must Be Running The Data Provider for the Data Destination Must Support Transactions

Tracking Data Lineage Using Data Lineage Tracks history of data at package and table row levels Provides audit trail of data transformation and DTS package execution Implementing Data Lineage Create the table columns in the data warehouse Add data lineage variables to the DTS package Map data lineage source and destination columns Viewing Data Lineage

Demonstration: Defining Transactions and Tracking Data Lineage

DTS Package Create Process Source Columns Steps Precedence Constraints Send Mail Bulk Insert Transfer Objects Execute SQL Data-driven Query Custom ActiveX Data Pump Steps Tasks Steps Global Variables Destination Steps Connections Creating a DTS Package Programmatically

Recommended Practices Correct and Validate Data at the Source Use an ActiveX Script or a Transact-SQL Script to Transfer and Transform Data Use a Temporary Data Storage Area Save and Store DTS Packages in the Microsoft Repository to Maintain Data Lineage Save and Store DTS Packages in the Microsoft Repository to Maintain Data Lineage

Lab A: Populating a Data Warehouse

Review Process Overview Methods of Populating a Data Warehouse Tools for Populating a Data Warehouse Populating a Data Warehouse by Using DTS