Você está na página 1de 18

Unit 3.

Source Qualifier

Unit 3

Unit Objectives
Understand when and how to use:
Source Qualifier transformation
Source Qualifier join
Overall lab project

Create and run pass through mappings

Unit 3

Source Qualifier Transformation


Selects records from flat file and relational table
sources. For relational tables, creates a SQL SELECT.

Active
Ports
Represent table columns
or file fields
All input/output (I/O)
Usage
Mandatory for flat file and
relational table sources
Converts source datatypes
to PowerCenter datatypes
For relational sources,
selects only columns used
in mapping
Unit 3

Datatype Conversion
NATIVE DATATYPES

Specific to the source and target


database types

PowerCenter internal datatypes

Display in source and target tables


within Mapping Designer

Display in transformations within


Mapping Designer

Native

TRANSFORMATION DATATYPES

Transformation

Native

Transformation datatypes allow mix and match of source and target database types
When connecting ports, native and transformation datatypes must be compatible
(or must be explicitly converted)
Unit 3

Velocity Methodology
In labs, we will use Informaticas Velocity methodology:
Templates
Mapping specification templates
Source to target field matrix,

Naming conventions
Object type prefixes: m_, exp_, agg_, wfl_, s_,

Best practices
Look for icon in labs

Unit 3

Lab Data Model


Mersche Motors Data Warehouse

Note: The fact tables have shared (conformed) dimensions


Unit 3

Two-Phase Process using Staging Area


ETL Phase 2
(Labs 8-20)

ETL Phase 1
(Labs 1-7)
Sources
Comma-delimited flat files
Fixed-width flat file
Relational tables

Staging
Area
Relational tables

Unit 3

Data
Warehouse
Relational tables

Labs Typical Sequence

Tool

Step

Designer

1. Import/create source metadata


2. Import/create target metadata
3. Create mapping

Workflow Manager 4. Create workflow


5. Run workflow
Workflow Monitor

6. Monitor workflow run

Designer

7. Preview target data

Unit 3

Unit 3 Lab A Load Payment Staging Table


Create a mapping and workflow to perform the following:

Lab A

Sources

Staging
Area

Payment Data (flat file)

STG_PAYMENT (table)

Unit 3

(pass through
mapping)

Lab A Review
What did we accomplish with this lab?
Questions?

Unit 3

10

Homogeneous Join

Joins combine data from different records

Homogeneous joins combine data from tables within the same database
related by primary and foreign keys in the PowerCenter source definitions

Specify homogeneous joins in a Source Qualifier transformation

The join is performed on the source database at runtime (when SQL


generated by the Source Qualifier executes)

Primary/foreign
key relationship

Unit 3

11

User Defined Source Qualifier Join

Enter join condition e.g.


tablea.employee_id=tableb.employee_id
Default is inner join specify other join types
(covered later) in the User Defined Join attribute

Unit 3

12

Unit 3 Lab B. Load Product Staging Table


Create a mapping and workflow to perform the following:

Staging
Area

Sources
Lab B

Product Data (table)


Product Cost (table)

STG_PRODUCT (table)

Unit 3

(homogeneous
join)

13

Lab B Review
What did we accomplish with this lab?
Questions?

Unit 3

14

Source Pipelines
Each Source Qualifier transformation starts a single
source pipeline
A mapping can have multiple source pipelines.
Transformations can split one source pipeline into
multiple pipeline branches
T
Source
pipeline

T
T

Unit 3

2 pipeline
branches

15

Unit 3 Lab C. Load Dealership &


Promotions Staging Tables
Create a mapping and workflow to perform the following:

Staging
Area

Sources
Lab C

Dealership Data (table)


Promotions Data (flat file)

STG_DEALERSHIP
STG_PROMOTIONS
(tables)

Unit 3

(2 pipeline
mapping)

16

Lab C Review
What did we accomplish with this lab?
Questions?

Unit 3

17

Unit 3 Quiz
1. When would you use a Source Qualifier transformation?
2. What kinds of ports does it have?
3. How can you use it to join two sources?

Unit 3

18

Você também pode gostar