ETL Processing Mechanics of ETL.

Slides:



Advertisements
Similar presentations
Creating the Date Dimension
Advertisements

SQL components In Oracle. SQL in Oracle SQL is made up of 4 components: –DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE. Creates / Alters.
Structured Query Language Part II Chapter Three CIS 218.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
COP4710 D ATABASE M ANAGEMENT C ONNECT TO P OSTGRE SQL SEVER VIA PG A DMIN Prof: Dr. Shu-Ching Chen TA: Haiman Tian.
CSC 2720 Building Web Applications Database and SQL.
ETL and Metadata. The ETL Process Source Systems Extract Transform Staging Area Load Presentation System.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
HSCI 709 SQL Data Definition Language. SQL Standard SQL-92 was developed by the INCITS Technical Committee H2 on Databases. SQL-92 was designed to be.
CSC 2720 Building Web Applications Database and SQL.
Data Management Console Synonym Editor
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Intro to SQL| MIS 2502  Spacing not relevant › BUT… no spaces in an attribute name or table name  Oracle commands keywords, table names, and attribute.
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
1 DBS201: More on SQL Lecture 3. 2 Agenda How to use SQL to update table definitions How to update data in a table How to join tables together.
©Silberschatz, Korth and Sudarshan1 Structured Query Language (SQL) Data Definition Language Domains Integrity Constraints.
SY306 Web and Databases for Cyber Operations Databases - The Relational Model.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Basic SQL*Plus edit and execute commands SQL*Plus buffer and built-in editor holds the last SQL statement Statements are created in free-flow style and.
Access Tutorial 2 Building a Database and Defining Table Relationships
Y.-H. Chen International College Ming-Chuan University Fall, 2004
Databases.
Insert, Update and the rest…
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
SQL – CRUD.
Referential Integrity MySQL
Session 4 PHP & MySQL.
Prepared for Prof. JAI NAVLAKHA By Hsin-Yu Ha
CSIS 115 Database Design and Applications for Business
ITEC 313 Database Programming
MySQL Explain examples
ETL Processing Mechanics of ETL.
Introduction to Computer Science (CIS 101)
The Relational Model Relational Data Model
لغة قواعد البيانات STRUCTURED QUERY LANGUAGE SQL))
SQL data definition using Oracle
COP4710 Database Management Connect to PostgreSQL sever via pgAdmin
Typically data is extracted from multiple sources
Consequence Mapping Key Question Primary Consequence
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
مقدمة في قواعد البيانات
Prepared for Prof. JAI NAVLAKHA By Hsin-Yu Ha
CS122 Using Relational Databases and SQL
CMPT 354: Database System I
This allows me to insert data for specified fields and not for other fields in the structure.
CS122 Using Relational Databases and SQL
Database Processing: David M. Kroenke’s Chapter Seven:
Database Management System
Session - 6 Sequence - 1 SQL: The Structured Query Language:
Access Tutorial 2 Building a Database and Defining Table Relationships
COP4710 Database Management Connect to PostgreSQL sever via pgAdmin
Access Tutorial 2 Building a Database and Defining Table Relationships
CS1222 Using Relational Databases and SQL
Data Definition Language
Data Definition Language
Prepared for Prof. JAI NAVLAKHA By Hsin-Yu Ha
Chapter 4 Introduction to MySQL.
CS122 Using Relational Databases and SQL
SQL-Data Definition 4/21/2019.
CS1222 Using Relational Databases and SQL
CS122 Using Relational Databases and SQL
Instructor: Samia arshad
A drag and drop exercise can be created using Word quite easily using tables, text boxes and ensuring the document is saved properly.
CS122 Using Relational Databases and SQL
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
SQL NOT NULL Constraint
SQL (Structured Query Language)
Data Base.
Presentation transcript:

ETL Processing Mechanics of ETL

The Flow Source File Extract Transform Transformed File Extract Generate Key Presentation Mart Surrogate Keys

The Flow Customer Extract Transform Transformed File CopyCustomer Generate Key Presentation Mart NewTable

Extract Customer data into a working table SELECT * INTO CustomerCopy FROM Customer;

Add Surrogate Keys Create a table with primary key and surrogate key attributes, transaction primary key as primary key and autoincrement for a new surrogate key

Create a Surrogate Key Table CREATE TABLE CustomerSurrogates (CustomerNumber TEXT(3) CONSTRAINT pk PRIMARY KEY, Surrogate AUTOINCREMENT, CustomerKey Integer);

Insert primary keys into the surrogate key table and generate surrogate keys. INSERT INTO CustomerSurrogates (CustomerNumber) SELECT CustomerNumber FROM CustomerCopy WHERE CustomerNumber NOT IN (SELECT CustomerNumber FROM CustomerSurrogates);

Copy the autonumber field into an integer field. UPDATE CustomerSurrogates SET CustomerKey = Surrogate WHERE CustomerKey IS Null ;

Add a CustomerKey column to the CustomerCopy table ALTER TABLE CustomerCopy ADD COLUMN CustomerKey NUMBER;

Update the CustomerCopy table to add surrogate keys. UPDATE CustomerCopy, CustomerSurrogates SET CustomerCopy.CustomerKey = CustomerSurrogates.CustomerKey WHERE CustomerCopy.CustomerNumber = CustomerSurrogates.CustomerNumber;

Drop unnecessary columns ALTER TABLE CustomerCopy DROP balance;