Upload
srikanthatp5940
View
91
Download
1
Tags:
Embed Size (px)
DESCRIPTION
hands on workshop
Citation preview
1
Informatica PowerCenter Hands-On Workshop
2
Agenda
Time Topic
9:00 Introduction to Informatica
9:30 Introduction to Informatica Data Integration Platform
10:00 Introduction to PowerCenter
10:30 Tutorial Lesson 1
11:30 Tutorial Lesson 2
12:30 Lunch
1:30 Tutorial Lesson 3
2:00 Tutorial Lesson 4
2:30 Using the Debugger
3:00 Putting It All Together
4:00 Tutorial Lesson 6
4:30 Review and Q/A
3
Workshop Objectives
By the end of the day you will:
• Understand – the broad set of data integration challenges
facing organizations today and how the Informatica Platform
can be used to address them
• Access – data from different data sources and targets
• Profile – a data set and understand how to look for basic
problems that need to be solved
• Integrate – data from multiple sources through Extraction,
Transformation and Load (ETL)
• Debug – data integration processes (mappings)
• Expose – integration logic as Web Services for use in a SOA
architecture
4
$0
$100
$200
$300
$400
$500
$600
$700
$800
$900
2005 2006 2007 2008 2009 2010 2011 2012
Informatica The #1 Independent Leader in Data Integration
• Founded: 1993
• 2012 Revenue: $811.6 million
• 7-year Annual CAGR:
17% per year
• Employees: 2,810+
• Partners: 450+
• Major SI, ISV, OEM and
On-Demand Leaders
• Customers: Over 5,000
• Customers in 82 Countries
• Direct Presence in 28 Countries
• # 1 in Customer Loyalty Rankings
(7 Years in a Row)
5
Global Presence & Global Perspective
Employees in 26
Countries….and growing!
Product Development Customer Support Professional Services
6
Why Informatica?
Proven Technology Leadership
7
Product Leadership Proven Technology Leadership
B2B Data Exchange
Informatica supports the
requirements of cross-organizational
data exchange, so users apply
familiar & trusted data integration
tools and techniques to the growing
practice of B2B data integration.
Cloud Data Integration Enterprise Data Integration
Complex Event Processing
Informatica received high praise for
its services from customers. For
deployments involving systems
monitoring use cases, Informatica
offers a five-day stand‐up of
RulePoint.
Ultra Messaging
In spite of the new entrants,
Informatica remains the market
leader in this highly demanding part
of the messaging market.
Data Quality Master Data Management
Application ILM
ULTRA
MESSAGING
COMPLEX EVENT
PROCESSING
B2B DATA
EXCHANGE
CLOUD DATA
INTEGRATION
ENTERPRISE DATA
INTEGRATION
APPLICATION
ILM
DATA
QUALITY
MASTER DATA
MANAGEMENT
8
Q1 2012
Informatica 9.1
Data Quality
Q4 2010 Cloud
• Cloud Express • Trust.InformaticaCloud.com • B2B & AddressDoctor plugins
• Big Data Integration • Self Service • Adaptive Data Services • Authoritative & Trustworthy Data
Q2 2011 Informatica 9.1
Q4 2011 ILM 9.1 MDM 9.2
• Dynamic Data Masking • Unified Registry & Hub MDM
Q3 2011 Ultra Messaging
Cloud MDM
• UM PowerCenter integration • Broad Cloud Connectivity • DQ Dashboards and Reports • MDM Counterparty Master • MDM Social Networking
Q1 2011 CEP 5.2
MDM
• Proactive Monitoring Options for DQ, PC
• MDM for DB2 • MDM Securities Master
Why Informatica? A Track Record of Continuous Innovation
• DQ templates
• DR 9.1 for Sybase
• CEP Proactive PC Monitoring
Q2 2012
Informatica 9.5
• Data Services 9.5
• PowerCenter 9.5
• PowerExchange 9.5
• Data Quality 9.5
• Data Explorer 9.5
Q3 2012
ILM DDM 9.5.1
IIR 9.5
MDM 9.5
• DVO 9.5
• ILM Dynamic Data
Masking 9.5.1
• Informatica Identity
Resolution 9.5
• Informatica MDM-
Registry Edition
9.5
9
Why Informatica? Empowering the Data-Centric Enterprise
Business &
Operational
Intelligence
Legacy
Retirement
Application
ILM
Customer,
Supplier,
Product
Hubs
BPO
SaaS
B2B
Integration
Application
Consolidation
Risk
Mitigation &
Regulatory
Reporting
Zero
Latency
Operations
Data Warehouse
Data Migration
Test Data Management & Archiving
Master Data Management
Data Synchronization
B2B Data
Exchange
Data
Consolidation
Complex Event Processing
Ultra
Messaging
Improve
Decisions
Modernize
Business
Improve
Efficiency
& Reduce
Costs
Mergers
Acquisitions
&
Divestitures
Acquire &
Retain
Customers
Outsource
Non-core
Functions
Governance
Risk
Compliance
Increase
Partner
Network
Efficiency
Increase
Business
Agility
BUSINESS IMPERATIVES
IT INITIATIVES
DATA INTEGRATION PROJECTS
10
Why Informatica? The Neutral, Trusted and Preferred Partner
OEM Partners Cloud Global SI Partners
Database and Infrastructure
BI OEM Partners Cloud Partners Global SI Partners
Database & Infrastructure
Operating Systems
Platforms & Technologies
INFORM SI
Partners
11
Secular Technology Megatrends IT is Changing
CLOUD
ON-PREMISE TRANSACTIONS DESKTOP
MOBILE INTERACTIONS
12
Data Integration Data is Changing
CLOUD
ON-PREMISE
INTERACTIONS
TRANSACTIONS
MOBILE
DESKTOP
13
Maximize Return on Data
14
We empower organizations to maximize return on
data to drive their top business imperatives
Our Singular Mission Maximize Return on Data
= Value of Data
15
Informatica Value Proposition Increase Value Of Data by Enabling Top Business Imperatives And Reduce IT Costs
TRANSACTIONS INTERACTIONS DESKTOPS MOBILE CLOUD ON-PREMISE
16
The Informatica Platform
17
18
TRANSACTIONS INTERACTIONS DESKTOPS MOBILE CLOUD ON-PREMISE
Informatica Value Proposition Comprehensive, Unified & Open
19
Source: An IDC White Paper - sponsored by EMC. As the Economy Contracts, the Digital Universe Expands.
Relational Data
“Transactional”
Social Data
“Interactional”
The Growing Challenge: “BIG DATA” Expanding the Frontiers of Data Integration
20
Big Data Confluence of Big Transaction, Big Interaction and Big Data Processing
Big Transaction Data Big Interaction Data
Online Transaction
Processing (OLTP)
Oracle
DB2
Ingres
Informix
Sysbase
SQL Server
…
Cloud
Salesforce.com
Concur
Google App Engine
Amazon
…
Other Interaction Data
Clickstream
image/Text
Scientific
Genomoic/pharma
Medical
Medical/Device
Sensors/meters
RFID tags
CDR/mobile
…
Social Media Data
Youtube
…
Big Data Processing
Online Analytical
Processing (OLAP) &
DW Appliances
Teradata
Redbrick
EssBase
Sybase IQ
Netezza
Exadata
HANA
Greenplum
DataAllegro
Asterdata
Vertica
Paraccel …
21
CUSTOMER
PRODUCT ORDER
Barriers to Becoming Data Driven
PRODUCT CUSTOMER CUSTOMER CUSTOMER
INVOICE ORDER INVOICE ORDER PRODUCT ORDER PRODUCT INVOICE
Customer Service Portal
Sales Automation Application
BI Application
• Data is not
timely
22
Barriers to Becoming Data Driven
CUSTOMER
PRODUCT ORDER
PRODUCT CUSTOMER CUSTOMER CUSTOMER
INVOICE ORDER INVOICE ORDER PRODUCT ORDER PRODUCT INVOICE
Customer Service Portal
Sales Automation Application
BI Application
• Data is not
timely
• Data is not
trustworthy
23
Barriers to Becoming Data Driven
Business IT
? ?
CUSTOMER
PRODUCT ORDER
PRODUCT CUSTOMER CUSTOMER CUSTOMER
INVOICE ORDER INVOICE ORDER PRODUCT ORDER PRODUCT INVOICE
Customer Service Portal
Sales Automation Application
BI Application
• Data is not
timely
• Data is not
trustworthy
• Data is not
relevant
24
Application Database Partner Data
SWIFT NACHA HIPAA …
Cloud Computing Unstructured
Data Warehouse
Data Migration
Test Data Management & Archiving
Master Data Management
Data Synchronization
B2B Data
Exchange
Data
Consolidation
The Informatica Approach Comprehensive, Unified, Open and Economical platform
25
What’s New with Informatica
26
Informatica Delivers Greater Value to Customers Acquisition of Best-in-Class Products from Adjacent Markets
Recent Acquisitions Since January 2009
Applimation (Jan. 2009) – Leader in Application Information Life Cycle Management.
Helping Customers manage their data assets from cradle-to-grave:
Data Archive for storing inactive and rarely accessed data on lower cost storage
medium.
Data Privacy for masking identifying and identity data to remain in compliance with
today’s stringent personal information and privacy laws.
Data Subset for creating purpose-built data sets for environment (DEV/QA/SYSTEM)
or functional (CRM/ERP/FINANCE/HR) based testing.
Address Doctor (Mid-2009) – Leader in Worldwide Name and Address Validation for Over
200 Countries. Providing Customers with the highest quality name and address content for
name and address standardization and validation.
Agent Logic (Oct. 2009) – Leader in Complex Event Processing and Operational
Intelligence. Helping Customers institutionalize event detection patterns and human
analysis patterns into automated opportunistic action and response alerts.
Siperian (Jan. 2010) – Leader in Master Data Management. Helping Customers achieve
mastery of a single view of ‘X’ across all mission critical data domains.
27
Introduction to PowerCenter
Enterprise Data Integration and ETL
28
29
30
31
32
PowerCenter
Cli
en
t S
erv
ice
s F
ram
ew
ork
Designer
Design
Workflow
Manager Workflow
Monitor
Repository
Repository
Service
Integration
Service
Web
Services
Adm
inis
trato
r
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Provider
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Portals, Dashboards, and Reports
Consumer
Informatica Platform Single unified architecture
Manage Monitor
33
PowerCenter
Cli
en
t S
erv
ice
s F
ram
ew
ork
Designer
Design
Workflow
Manager Workflow
Monitor
Repository
Repository
Service
Integration
Service
Web
Services
Adm
inis
ter
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Provider
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Portals, Dashboards, and Reports
Consumer
Proven Scalability Threaded Parallel Processing
Manage Monitor
Provider Thread Consumer Thread
In-memory pipeline
Partition Point
Transformation Threads
34
PowerCenter
Cli
en
t S
erv
ice
s F
ram
ew
ork
Designer
Design
Workflow
Manager Workflow
Monitor
Repository
Repository
Service
Integration
Service
Web
Services
Adm
inis
trato
r
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Provider
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Portals, Dashboards, and Reports
Consumer
Proven Scalability Pipeline Parallel Processing
Manage Monitor Provider Thread Consumer Thread Transformation Threads
In-memory pipeline
Provider Thread Consumer Thread Transformation Threads
In-memory pipeline
35
What will we learn in this chapter?
How to:
1. Launch PowerCenter Designer to start your project
2. Connect to the PowerCenter Repository
3. Import Source and Target Structures
• From Relational Tables and Flat Files
4. Create Target Structures
• Define Tables and Create them in the Database
36
PowerCenter Client Tools
Designer – Used to create mappings that logically define what is to be done and how. Mappings define the sources, the targets and the transformations that you want to perform on the data all through a graphical drag and drop environment.
Workflow Manager – Used to create, schedule and run workflows. A workflow is a set of instructions that describes how and when to run tasks related to extracting, transforming, and loading data.
Workflow Monitor – Used to graphically monitor the status of scheduled and running workflows for each PowerCenter server. You can view what tasks succeeded or failed and drill into the execution logs for each task to get run-time details.
Repository Manager – Used to create and administer the metadata repository. You can create users and groups and assign privileges and permissions to them and create folders to contain the metadata.
37
PowerCenter
Cli
en
t S
erv
ice
s F
ram
ew
ork
Designer
Design
Workflow
Manager Workflow
Monitor
Repository
Repository
Service
Integration
Service
Web
Services
Adm
inis
trato
r
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Provider
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Portals, Dashboards, and Reports
Consumer
Informatica Platform Single unified architecture
Manage Monitor
38
Sub-Tools within Designer
Source Analyzer - Used to Import or create source definitions.
Warehouse Designer - Used to Import or create target definitions.
Mapplet Designer - Used to create reusable groups of transformations
Transformation Designer - Used to create reusable transformations
Mapping Designer - Used to create mappings to extract, transform and load data.
39
Source Analyzer
• Integrated. Key component of PowerCenter Designer, Source
Analyzer offers “universal data access” in a single unified platform
• Consistent. A single consistent method to access and manage
any data source regardless of type or location
• Visual. Simple graphical interface for importing and creating source
definitions for any of the data sources supported by PowerCenter
40
Target Designer
• Integrated. Key component of PowerCenter Designer, Target
Analyzer offers “universal data access” in a single unified platform
• Consistent. A single consistent method to access and manage
any data target regardless of type or location
• Visual. Simple graphical interface for importing target definitions for
any of the data types supported by PowerCenter
• Extensible. Can create target definitions, executable DDLs, and
even create new tables in the warehouse
41
Tutorial Lesson 1 – 15 min
5 min for Lab and 10 min Break
Creating Users and Groups
Creating a Folder in the PowerCenter Repository
Creating Source Tables:
Pre Requisite - Create the demo source tables.
42
Lesson 2
Creating Source Definitions
Creating Target Definitions and Target Tables
43
Lab 2: Step-by-step Overview
1. Launch the Designer
2. Log into the repository
3. Import relational source structure
4. Import flat file source structure
5. Create a relational target structure and build it in the relational instance
44
Using Designer
Double-Click to Launch Designer
45
Using Designer
1. Right-click the Workshop repository
2. Select Connect to open
46
Using Designer
1. Enter Username: Administrator
2. Enter Password: Administrator
47
Using Designer
1. Right-click the MappingLab
folder
2. Select Open to open
This is where most of our work will
be done
48
Using Designer
We should now be in the Source Analyzer
1. Make sure you see Source Analyzer at the
top left hand part of the gray work area
49
Using Designer
Import a relational source
1. From the menu bar select Sources
Import from Database
50
Using Designer
In the Import Tables dialog,
choose the ODBC
connection for the data
source where the source
tables reside
1. Click the ODBC data
source drop-down box
2. Select the data source
called “source” Note – Informatica only uses ODBC to import the
metadata structures into PowerCenter.
51
Using Designer
1. Enter Username: pc_user
2. The Owner name will self populate
3. Enter Password: pc_user
4. Press Connect
52
Using Designer
1. Open up the directory tree under Select tables
2. select table CUSTOMERS
3. Press OK
53
Using Designer
1. Verify the source
metadata structure for
the CUSTOMERS and
GOOD_CUST_STG
tables
Next, we will import our flat
file source structure
54
Using Designer
1. From the menu bar and select Sources
Import from File
55
Using Designer
1. Navigate to the “C:\PowerCenter Workshop” directory
2. Select the TRANSACTIONS.dat file
56
Using Designer
1. Select the “Import field
names from the first
line” check box – this
tells PowerCenter to start
importing from the second
line (Note “Start Import at
Row:” has changed to “2”)
2. Keep the remaining
defaults (the flat file
source Delimited – not
Fixed Width)
3. Press Next The flat file wizard is now displayed
which allows us to parse through our flat
file source.
57
Using Designer
1. Keep the defaults (the flat
file is comma delimited)
2. Press Next Look around this page. Notice you can
account for multiple delimiters, consecutive
delimiters and quotes around data.
58
Using Designer
1. Press Finish
Earlier we told PowerCenter to
use the first line of the original flat
file for the column names. Note
that the columns are now named
for us. Review the other options
on this page.
59
Using Designer
Congratulations!
You just successfully imported one flat file and
two relational source structures.
60
Using Designer
Select the Target Designer to bring in our
target structures
1. Select the second icon on the shortcut line
61
Using Designer
Notice when you select the Target designer, the
menu options change. One now says Targets
1. Select Targets and choose the Import from
Database option
62
Using Designer
The target structures are in the target instance of the
database
1. Select the target ODBC data source named “target”
63
Using Designer
1. Enter Username: target
2. The Owner name will self populate
3. Enter Password: target
4. Press Connect
64
Using Designer
1. Expand the directory tree
2. Select CUSTOMER_NONAME
and GOOD_CUSTOMERS
3. Select OK
CUSTOMER_NONAME will capture all of our
records that do not have an associated customer
name. GOOD_CUSTOMERS will capture all
clean records to be loaded into our Data
Warehouse.
65
Using Designer
Build a date table
Select Targets Create
One of the objectives of our Data Warehouse is to allow
end users to drill into a customer name and determine
the date that the customer has purchased their items.
66
Using Designer
Select the database type
1. Click the drop-down box and choose
Oracle for the database type
67
Using Designer
1. Enter CUSTOMER_DATES as the name
for the target table
2. Press Create
68
Using Designer
A new table should appear in the workspace
behind the pop up menu
1. Select Done to close the Create Target
Table dialog
69
Using Designer
Edit the table - CUSTOMER_DATES
1. Double-click the CUSTOMER_DATES table
70
Using Designer
The properties for the CUSTOMER_DATES table is displayed
71
Using Designer
1. Select the Columns tab
72
Using Designer
Add columns to the table
1. Press the “Add” icon three times to add in
three new columns
73
Using Designer
1. Click NEWFIELD
2. Rename the column CUST_ID
74
Using Designer
1. Click in the Datatype column
drop-down for CUST_ID
2. Select number
75
Using Designer
1. Click in the Key Type drop-down for
CUST_ID to make this field a Primary Key
76
Using Designer
1. Change the second Column
Name to TRANSACTION_ID
2. Change the Datatype of the
TRANSACTION_ID to number.
3. Change the third Column Name
to Date_of_Purchase
4. Change the Datatype of the
Date_of_Purchase column to
date
5. Press OK
77
Using Designer
We now have a metadata target structure in the
PowerCenter Metadata Repository. We will now
build the table in the Oracle target instance.
78
Using Designer
Build the table in the Oracle target instance
1. Select Targets Generate/Execute SQL…
79
Using Designer
Connect to the Oracle instance
1. Press Connect
80
Using Designer
1. Press the ODBC data source drop-
down menu
2. Select the “target” database
81
Using Designer
1. Enter the Username “target”
2. Enter the Password “target”
3. Press Connect
82
Using Designer
We are now connected to “target”
Build the CUSTOMER_DATES table
1. Select Selected tables on the radio menu (we only want to build
the CUSTOMER_DATES table)
2. Choose the options above (We know the table doesn’t exist but
let’s drop the table before we build the new one just in case)
3. Press “Generate and execute”
83
Using Designer
The table has been successfully built
1. Close the Database Object Generation box
84
Using Designer
With the Target Designer Selected
1. Expand the Sources folder so that GOOD_CUST_STG is visible
2. Drag the GOOD_CUST_STG object from the Sources directory tree
in the navigation pane to the Target Designer Canvas.
The table GOOD_CUST_STG is for staging
good customer records prior to loading them
into the data warehouse. It will be used as
both a target (when we clean the data) and
a source (when we load the clean data into
the warehouse). We can reuse the source
definition to create the target.
85
Using Designer
GOOD_CUST_STG is now setup to be used
as both a source and a target in
PowerCenter. However, while the table
exists in PowerCenter, it does not yet exist in
our target Oracle database. Let’s build this
table in our target Oracle database.
86
Using Designer
Build the table in the Oracle target instance
1. Select Targets Generate/Execute SQL…
87
Using Designer
Connect to the Oracle instance
1. Press Connect
88
Using Designer
1. Press the ODBC data source drop-
down menu
2. Select the “target” database
89
Using Designer
1. Enter the Username “target”
2. Enter the Password “target”
3. Press Connect
90
Using Designer
We are now connected to “target”
Build the GOOD_CUST_STG table
1. Select Selected tables on the radio menu (we only want to build
the GOOD_CUST_STG table)
2. Choose the options above (We know the table doesn’t exist but
let’s drop the table before we build the new one just in case)
3. Press “Generate and execute”
91
Using Designer
The table has been successfully built
1. Close the Database Object Generation box
92
Using Designer
If we look back at the directory
tree in the Navigation Pane, we
will see that we now have three
Sources
• TRANSACTIONS (flat file)
• CUSTOMERS (relational)
• GOOD_CUST_STG (relational)
and four Targets (all relational)
• CUSTOMER_DATES
• CUSTOMER_NONAME
• GOOD_CUSTOMERS
• GOOD_CUST_STG
93
Lab 2: Tutorial Lesson 2
15 min
Creating Source Definitions
Creating Target Definitions and Target Tables
94
Lesson 3: Building a Mapping
Creating a Pass-Through Mapping
Creating Sessions and Workflows
Running and Monitoring Workflows
95
What will we learn in this chapter?
• What is a mapping?
• What are Transformation Objects?
• How do we build a mapping?
• How do we Join sources together?
• How do we separate out records with
missing data?
96
PowerCenter – Mapping Designer
• A mapping is a logical definition of your Data
Integration process – it represents a set of source
and target definitions that are linked by
transformation objects.
• The mapping designer is a graphical drag and drop
environment that lets you define the sources, define
the targets and the transformations that you want to
perform on the data
• An easy to use GUI environment for creating,
organizing, and maintaining a series of mappings.
97
• Update Strategy
• Source Qualifier
• Sort
• Rank
• Sequence Generator
• Aggregator
• Transaction Control
• Router
• Normalizer
• Custom Transformation
• Stored Procedure
• Lookup • Mapplet
• Filter
• JAVA
• Target Definition
• Union
• XML Parser
• XML Generator
• Expression
• Joiner
• Mapplet Input
• Mapplet Output
PowerCenter Transformations Some examples
Transformations used
in this mapping.
For a detailed
description of these
Transformations and
their function see the
tables in Appendix A
98
PowerCenter Functions
Summary view of all available functions
Character manipulation (CONCAT, LTRIM, UPPER, …)
Datatype Conversion (TO_CHAR, TO_DECIMAL, …)
Data matching and parsing (Reg_Match, Soundex, …)
Date manipulation (Date_Compare, Get_Date_Part, …)
Encryption/Encoding (AES_Encrypt, Compress, MD5, …)
Financial Functions (PV, FV, Pmt, Rate, …)
Mathematical operations (LOG, POWER, SQRT, Abs, …)
Trigonometric Functions (SIN, SINH, COS, TAN, …)
Flow Control and Conditional (IIF, DECODE, ERROR, …)
Test and Validation (ISNULL, IS_DATE, IS_NUMBER, …)
Library of Reusable User Created Functions
Variable Updates (SETVARIABLE, SETMINVARIABLE, …)
Available Lookups that may be used
Some Examples. A more complete
reference can be found in the
Appendix B at the end of this Guide
99
In this Scenario…
We show how to build mappings with Designer. Mappings
are a logical process that define the structure of data and
how it is changed as it flows from one or more data
sources to target locations. Mappings are the core of the
Informatica data integration tool set. With Informatica
transformations and mappings are reusable and can be
used in multiple different scenarios.
For our first mapping we need to combine two sets of data
for our data warehouse. We also need to separate good
records from bad ones that are missing the customer
name.
100
Sample Step-by-step Overview Scenario
1. Create a new mapping:
2. Join data from two sources CUSTOMERS and
TRANSACTIONS.dat
3. Check to see if the Customer Name is missing
from any of the records
4. Store these records in the CUSTOMER_NONAME
table
5. Write all good records to the staging table
GOOD_CUSTOMERS_STG for loading into the
warehouse
101
How to build a Mapping
1. Select the Mapping Designer icon
102
How to build a Mapping
1. Validate that the Mapping Designer is active
103
How to build a Mapping
1. Select Mappings Create to start building a new mapping
104
How to build a Mapping
1. Rename the mapping m_remove_missing_customers
2. Press OK
105
How to build a Mapping
Add the source TRANSACTIONS to the mapping
1. Expand the “+” next to “source” and “Flatfile” so TRANSACTIONS
and CUSTOMERS are visible (as above)
2. Drag the TRANSACTIONS source into the work area
106
How to build a Mapping
The TRANSACTIONS source is added to the mapping.
107
How to build a Mapping
Add the source CUSTOMERS table to the mapping
1. Click and drag the CUSTOMERS source into the workspace
108
How to build a Mapping
Both TRANSACTIONS and CUSTOMERS are now
added to the mapping.
109
How to build a Mapping
Add the target tables to the mapping.
1. Expand the Targets folder
2. While holding CTRL select the CUSTOMER_NONAME and
GOOD_CUST_STG tables
3. Still holding CTRL, drag them onto the workspace
110
How to build a Mapping
111
How to build a Mapping
1. Collapse the Navigation Pane for now to give us more
work space (Single click-left icon)
2. Collapse the Output Window at the bottom of our screen
(Single Click-right icon)
112
How to build a Mapping
Add a joiner transformation to join the two source files together
1. Single click on the joiner transform
2. Single click in the workspace, the Joiner transformation should appear
113
How to build a Mapping
1. Highlight all of the fields in the TRANSACTION Source Qualifier
transformation (holding SHIFT, click the first field then click the last)
2. Still holding SHIFT, drag the selection to the Joiner Transformation
114
How to build a Mapping
To join the two sources we
need to add the Customer
fields to the Joiner
1. Highlight the fields in the
CUSTOMERS Source
Qualifier transformation
2. Drag them to the Joiner
Next, we need to edit the
Joiner properties
1. Double-click on the
Joiner
115
How to build a Mapping
1. Click Rename
Remember, all of this metadata will be captured in the PowerCenter
Metadata Repository. Since we have the ability to report on the
PowerCenter Metadata Repository, we want the names of our
transformation objects to be meaningful.
116
How to build a Mapping
1. Rename the joiner “jnr_many_to_one”
2. Click OK
117
How to build a Mapping
1. Click on the Ports tab Notice that once we have a field in each
source named CUST_ID, it named the
second instance of CUST_ID to CUST_ID1.
118
How to build a Mapping
Add a join condition
1. Click on the Condition tab
2. Click on the Add condition icon
119
How to build a Mapping
1. Press OK
A default condition will be displayed. Since we
have two fields with similar names, by default,
the condition will use these to field names.
120
How to build a Mapping
With the data joined we need to separate good records from those
with missing customer names.
1. Click on the Router Transformation
2. Click on the workspace to add a router to the mapping
121
How to build a Mapping
We want to keep all of the fields from the Joiner except
CUST_ID1, which is the same as CUST_ID.
1. Hold CTRL and select all fields except for CUST_ID1
2. Drag the selected fields to the Router
We need to tell the Router what conditions to check for.
1. Double-click the Router to edit it.
122
How to build a Mapping
Rename the Router
1. Click Rename
2. Type Transformation Name “rtr_check_customer_name”
3. Click OK
123
How to build a Mapping
1. Select the Groups tab.
124
How to build a Mapping
We need to create two groups. One for
records with a customer name and one
records where the name is missing.
1. Click the Add button twice.
The Router groups data based on user defined
conditions. All records that meet the Group Filter
Condition are included in the output for that group.
125
How to build a Mapping
Rename the Groups
1. Click on the first Group Name
2. Rename the group GOOD_CUSTOMER
3. Click on the second Group Name
4. Rename the group CUSTOMER_NONAME
Next we need to edit the Group Filter Condition
1. Click the arrow on the first condition to open editor
126
How to build a Mapping
Bad records have a NULL value for the customer
name. If the record is not NULL then it is good.
1. Enter the expression:
NOT ISNULL(CUST_NAME)
2. Click Validate to test your expression
3. Click OK, to close the message window.
4. Click OK, to close the Expression Editor
127
How to build a Mapping
1. Open the Expression Editor for
CUSTOMER_NONAME
128
How to build a Mapping
1. Enter the expression:
ISNULL(CUST_NAME)
2. Click OK
129
How to build a Mapping
1. Press OK
130
How to build a Mapping
The Router appears. Expand the transformation and scroll down
to see the two we created.
131
How to build a Mapping
We need to connect the output
groups to the appropriate table.
1. Expand the Router transform
and scroll until the
GOOD_CUSTOMER group
is visible
2. Select all of the fields (or
ports) under
GOOD_CUSTOMER
3. Drag the selected fields to
the CUST_ID field on the
GOOD_CUST_STG target
Note: When you drag and release, Designer connects the
first field in the set being dragged to the field under the
cursor when the mouse is released, the second with the
second and so on. If your fields are not in matching order
you may need to connect them one at a time.
132
How to build a Mapping
1. Connect the
CUSTOMER_NONAME
group to the
CUSTOMER_NONAME
target table
Both tables should now be
connected
133
How to build a Mapping
We’re almost done. A few final details before we finish.
1. Click the disk icon to Save the mapping
2. Click the Toggle Output Window icon to view save
status and other messages
3. Verify the mapping is VALID, if it is not check for
Error messages
4. Finally clean up the workspace. Right-click and
select Arrange All Iconic
134
How to build a Mapping
Congratulations!
You just built your first mapping.
135
Lab 3: 20 min (take 5 min break) Creating a Pass-Through Mapping
Creating a Pass-Through Mapping
136
Lesson 3: Workflow
Using Workflow Manager and Monitor
137
What will we learn in this section?
1. What is Workflow Manager?
2. How do we build a session task?
3. How do we sequence sessions?
4. How do we execute our mapping?
5. How do we monitor execution with Workflow
Monitor?
138
PowerCenter
Cli
en
t S
erv
ice
s F
ram
ew
ork
Designer
Design
Workflow
Manager Workflow
Monitor
Repository
Repository
Service
Integration
Service
Web
Services
Adm
inis
trato
r
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Provider
XML, Messaging, and Web Services
Packaged Applications
Relational and Flat Files
Mainframe and Midrange
Portals, Dashboards, and Reports
Consumer
Informatica Platform Workflow Manager and Workflow Monitor
Manage Monitor
139
Workflow Tasks
Workflow Tasks Description
Assignment Assigns a value to a workflow variable
Command Specifies a shell command to run during the workflow.
Control Stops or aborts the workflow.
Decision Specifies a condition to evaluate.
Email Sends email during the workflow.
Event-Raise Notifies the Event-Wait task that an event has occurred.
Event-Wait Waits for an event to occur before executing the next task.
Session Runs a mapping you create in the Designer.
Timer Waits for a timed event to trigger.
140
In this Scenario…
We will use the Workflow Manager and Workflow Monitor to
build a workflow to execute the mappings we just built. We
will configure our workflow and then monitor the workflow in
the Workflow Monitor. Along the way, we will investigate
the various options in both tool sets.
141
Step-by-step Overview
1. Open the Workflow Manager through Designer
2. Create a session task.
3. Configure the session task to run the mappings we
just built.
4. Investigate the options in the Workflow Manager.
5. Monitor the execution of the session in the
Workflow Monitor.
6. View the run properties and session log in the
Workflow Manager.
142
Working with Data
Launch the Workflow Manager
1. Press the Orange W on the tool bar above
to launch the Workflow Manager
143
Workflow Manager Tools
Create reusable
tasks
Create worklets Create
workflows
144
1. Select the Workflow Designer
Using the Workflow Manager
145
1. Select the Session task and drop it in by
clicking on the Workflow Designer
workspace
Using the Workflow Manager
146
We need to join and remove records with no customer name before
we can load them into the Data Warehouse.
1. Select the mapping m_remove_missing_customers
2. Click OK
Using the Workflow Manager
147
Keep all the defaults
1. Press OK
Using the Workflow Manager
148
We need to configure the Session to
connect to the source and target structures
1. Double-click the Session task to open
and edit it
Using the Workflow Manager
149
Using the Workflow Manager
1. Select the Mapping tab 2. Select SQ_TRANSACTIONS (under the
Sources folder on the left)
150
1. Scroll down under Properties until you see Source file directory
2. Enter the location “C:\PowerCenter Workshop” as the Source file
directory
3. Enter “TRANSACTIONS.dat” as the Source filename
Using the Workflow Manager
151
1. Select SQ_CUSTOMERS under Sources on the left
2. Click the drop-down to select the correct Oracle
instance that houses this source table
Using the Workflow Manager
152
The Relational Connection Browser opens
1. Select the Source connection under Objects (this is the
Oracle instance where the CUSTOMERS table resides)
2. Press OK
Using the Workflow Manager
153
Configure the target structures
1. Select CUSTOMER_NONAME from the Targets folder on the left
2. Click the drop-down box under Value to open the Relational Connction
Browser
Using the Workflow Manager
154
1. Select Target
2. Press OK
Using the Workflow Manager
155
Using the Workflow Manager
1. Right click in the Value box
2. Select Apply Connection Value To all Instances
to assign this connection value to all target tables
Since all of our target
tables exist in the same
place, let’s take a
shortcut.
156
Using the Workflow Manager
1. Review the information for GOOD_CUST_STG
2. Notice Target is already filled in
3. Press OK to close the Session Editor
157
Using the Workflow Manager
1. Under Properties, scroll down and select the
Truncate target table option
2. Select OK to close the Session Editor
The GOOD_CUST_STG staging table may
have data in it from previous runs. We
want to make sure the only data in the table
is for the current run.
158
Using the Workflow Manager
1. Add another Session task to the workspace
Loading the Data Warehouse is a two part process.
The first mapping/session joins the source data,
removes bad records and loads good data into a
staging table. The data still needs to be refined and
loaded into the Data Warehouse. The second
mapping we built does this.
159
1. Select the mapping m_build_customer_DW
2. Click OK
Using the Workflow Manager
160
The new Session is added. We need to sequence the sessions
so they execute in the proper order.
1. Select Link Tasks
2. Click on the left session and drag to the session on the right,
so the sessions are connected.
3. Double-click the new Session (on right) task to edit it
Using the Workflow Manager
161
1. Select the Mapping tab
Using the Workflow Manager
162
1. Select SQ_GOOD_CUST_STG under Sources on the left
2. Click the arrow under Value to select the correct Oracle
instance for this source table
Using the Workflow Manager
163
In the Relational Connection Browser
1. Select the Target connection under Objects – why ??
2. Press OK
Using the Workflow Manager
164
Configure the target structures
1. Select CUSTOMER_DATES from the Targets folder on the left
2. Click the arrow under Value to open the Relational Connction Browser
Using the Workflow Manager
165
1. Select Target
2. Press OK
Using the Workflow Manager
166
Using the Workflow Manager
1. Right click in the Value box
2. Select Apply Connection Value To all Instances
to assign this connection value to all target tables
Since all of our target
tables exist in the same
place, let’s take a
shortcut.
167
Using the Workflow Manager
1. Verify GOOD_CUSTOMERS now uses the Target
Connection
168
Using the Workflow Manager
Under the Transformations folder in the left navigation pane
1. Verify the lkp_product_description Connection Value
uses Source, if not click the arrow and update
2. Click OK
The Lookup
Transformation also
requires a Connection
169
Using the Workflow Manager
Take a moment to review the
configuration options under
the other session tabs.
1. Review Properties
Properties allow you to specify
log options, recovery strategy,
commit intervals for this
session in the workflow and so
forth. Note in this case the
workflow will continue even if
the mapping fails.
170
Using the Workflow Manager
1. Review Config Object
The Config Object allows
you to specify a variety of
Advanced, Logging, Error
Handling and Grid related
options. Scroll down to
view the range of options
available.
171
Using the Workflow Manager
1. Review Components
2. Select OK to close the
Session Editor
In the Components tab,
you can configure pre-
session shell commands,
post-session commands,
email messages if the
session succeeds or fails,
and variable assignments.
172
Using the Workflow Manager
Save the workflow
1. Click Save under the Repository menu
173
Using the Workflow Manager
1. Verify the workflow is VALID, if not
scroll up to check for errors
2. Select Workflows Start Workflow
174
Using the Workflow Monitor
Workflow Monitor provides
a variety of views for
monitoring workflows and
sessions. This view shows
the status of running jobs.
1. Notice that the Workflow Monitor is
displayed when you start a workflow
2. Let the task run to completion
175
Using the Workflow Monitor
1. Select the Task View tab
This view allows users to view the tasks
associated with a specific workflow. Note
that in this case our workflow has two
sessions and has been successfully run
several times. Your view may vary
depending on when and how many times
you have run your mapping
176
Using the Workflow Monitor
1. Select the Gantt Chart view
2. Right click on the first session in the
workflow we just ran
3. Select Get Run Properties
177
Using the Workflow Monitor
1. Review the Task Details
2. Note the session Status
3. Note the number of
Source and Target rows
Do the results make sense?
Two tables were joined so we
would expect a lower total
written than read, Correct?
1. Click and expand
Source/Target Statistics
178
Using the Workflow Monitor
1. Review Source/Target Statistics
2. 8 rows were written to CUSTOMER_NONAME Table
but 11 were rejected rows
3. Scroll over and check the Last Error Message for
that target
Looks like Writer execution failed for some reason with
error 8425. Let’s take a look at the session log and find out
what the 8425 error is. 1. Select the Get Session Log tab
(Hyperlink on top right)
179
Using the Workflow Monitor
1. Select Find. . .
2. Enter the Error Number 8425
3. Select the radio button for All fields
4. Select Find Next
180
Using the Workflow Monitor
1. Close out the session
It seems we have a unique constraint violation. Mostly likely there
are duplicate primary keys in the data. Let’s debug.
181
Using the Workflow Manager
1. Open up our Session Task again
In order to debug, let’s override writing our
data to the CUSTOMER_NONAME table.
182
Using the Workflow Manager
1. Select CUSTOMER_NONAME from the Mapping tab
2. Override the Relational Writer
3. Select the drop-down box
183
Using the Workflow Manager
1. Select File Writer
Notice we can override our target because
PowerCenter separates logical design
from physical bindings. Specifically
mappings do not include connection
information, while workflows do, actual
binding occurs at runtime.
184
Using the Workflow Manager
1. Under properties Scroll down
to Header Options
2. Click drop-down and select
Output Field Names
3. Select Set File Properties
185
Using the Workflow Manager
1. Switch the radio button to Delimited
2. Press OK
3. Press OK to exit the Session Editor
186
Using the Workflow Manager
1. Save the changes we made
2. Verify the workflow is VALID
3. Run the workflow again
187
Using the Workflow Monitor
1. Review the output file
We were now able to load all 19 rows.
No rows were rejected.
188
Using the Workflow Monitor
1. In Windows Explorer navigate to
C:\Informatica\9.0.1\server\infa_shared\TgtFiles
2. Double-click on the customer_noname1.out file
189
Using the Workflow Monitor
As we suspected, we have duplicate Customer IDs
and will have to deal with that in our mapping, but
we’ll save that for another day!
190
Using the Workflow Monitor
1. Go to Designer and open the Target Designer
2. Right click on the GOOD_CUSTOMERS target
3. Select Preview Data. . .
Before we finish, we want to verify that our
data loaded into the Data Warehouse.
191
Using the Workflow Monitor
1. Verify the ODBC data source is target
2. Enter Username: target
3. Enter Password: target
4. Press Connect
192
Using the Workflow Monitor
Congratulations!!
The Data was
Successfully Loaded!
You just completed
building and loading the
Data Warehouse!
193
Lab 3: 30 min 10 min break
Creating Sessions and Workflows
Running and Monitoring Workflows
194
Lesson 4
195
What will we learn in this section?
• How to use a look-up to enrich records with
data from another source?
• What is a reusable transformation?
• How to use expressions to format data?
• How to use aggregate functions to
generate results from a data set?
196
In this Scenario…
We will use Designer to build another mapping.
Where the last lab focused on joining raw data
and removing bad records, this lab focuses on
using transformations to convert, enrich, and
reformat the data and, finally, load it into the data
warehouse.
Specifically, we will be working with the good
records that the first mapping loaded into the
staging table.
197
• Update Strategy
• Source Qualifier
• Sort
• Rank
• Sequence Generator
• Aggregator
• Transaction Control
• Router
• Normalizer
• Custom Transformation
• Stored Procedure
• Lookup • Mapplet
• Filter
• JAVA
• Target Definition
• Union
• XML Parser
• XML Generator
• Expression
• Joiner
• Mapplet Input
• Mapplet Output
PowerCenter Transformations Some examples
Transformations we
will use in this lab
198
Step-by-step Overview
1. Create a new mapping called
m_build_customer_DW
2. Get a product description from the PRODUCT table
3. Format customer names and product descriptions
so the first letter is Upper Case
4. For the good data, perform a simple calculation to
determine total revenue
5. Collapse any duplicates
6. Load transaction dates into a table so a reporting
tool can get the date of a specific transaction
199
How to build a Mapping
Starting from the Mapping Designer
1. Select Mappings Create to build a new mapping
200
How to build a Mapping
1. Rename the mapping m_build_customer_DW
2. Press OK
201
Working with Data
Add the source GOOD_CUST_STG to
the mapping
1. Drag the GOOD_CUST_STG
source into the work area
Note: This is the source view of
the same staging table we wrote
the good customer data to in the
last lab.
202
Working with Data
The GOOD_CUST_STG source is added to the mapping
203
How to build a Mapping
Add the target tables to the mapping
1. Expand the Targets folder
2. Select and drag CUSTOMER_NONAME and
GOOD_CUST_STG tables onto the workspace
204
How to build a Mapping
All sources and
targets are now
imported
1. Collapse the
Navigation Pane
for now to give us
more space to
work space
2. Collapse the
Output Window
at the bottom of
our screen
205
Working with Data
Add a Lookup Transformation
1. Click the Lookup Transformation icon
once and single click in the workspace
The Lookup Transformation will
allow us to pull back the product
description names from our
PRODUCT table. This is required
by the end user so they can see
exactly what products were
purchased by our customers.
206
Working with Data
Select the Lookup Table
1. Click on the Import tab
2. Select From Relational Table
207
Working with Data
1. Click on ODBC data source the drop-
down box
2. Select the “source” ODBC connection
We have to connect to the database
instance that holds our lookup table.
Note that PowerCenter will NEVER
override database level security.
208
Working with Data
1. Enter the Username “source”
2. Enter the Password “source”
3. Press Connect
209
Working with Data
1. Expand up TABLES folder
2. Select the PRODUCT table
3. Press OK
210
Working with Data
The Lookup Transformation
appears in the workspace.
We will use the Product_ID
from the source to lookup the
data we need
1. Highlight the
PRODUCT_ID field from
the Source Qualifier
and drag it onto the
white space at the
bottom of the Lookup
211
Working with Data
Open and configure the Lookup Transformation
1. Double-click on the Lookup
212
Working with Data
1. Press Rename
2. Rename the transformation “lkp_product_description”
3. Press OK
213
Working with Data
1. Select the Condition tab
2. Click the Add condition button
Much like the joiner, the lookup transformation requires a condition to be
true for it to pass values. In this case, we want the product ID from the
TRANSACTIONS file to match the product ID in the PRODUCTS table.
Once there is a match, the lookup will return the proper product
description value.
214
Working with Data
We want to return the Product Description that matches
the Product_ID we passed in. Designer automatically
identified the correct ports to compare for the lookup.
No change is required
1. Click on the Ports tab
215
Working with Data
Select the Return value
1. Check the box in the “R” column for PRODUCT_DESC
2. Press OK
216
Working with Data
Add an Expression for
formatting data
1. Select the Expression
Transformation
2. Click on the
workspace
We would like to do some formatting on
our source data. We want the initial
character of our customer names and
product descriptions to be Upper Case
217
Working with Data
1. Click and drag all the required fields from the Source Qualifier to
the Expression Transformation (skip the PRODUCT_ID field
since we only need it for the lookup)
218
Working with Data
We need to add the Lookup
output in with the other ports
1. Drag the PRODUCT_DESC
port from Lookup to a blank
line in the Expression
219
Working with Data
Minimize completed transformations
1. Click on the minimize icon for each completed transformation
2. Next, double-click on the Expression Transformation to edit it
220
Working with Data
1. Press Rename
2. Enter “exp_format_data”
3. Press OK
221
Working with Data
1. Select the Ports tab
2. Add field button twice to add two “output ports”
3. Select the first field and rename it CUST_NAME_OUT
4. Select the second field and rename it
PRODUCT_DESC_OUT
222
Working with Data
1. Change the precision to 50 for each new port
2. De-select the “O” (output) ports for CUST_NAME and PRODUCT_DESC
(they will be replaced by the new fields)
3. De-select the “I” for the new fields (they originate here and have no input)
• When the “O” is selected the expression editor box on the right will
become active
223
Working with Data
1. Select the Expression box area next to the first field
CUST_NAME_OUT (an arrow will appear)
2. Click the arrow to open the Expression Editor
224
Working with Data
Notice the help!!!
Press F1 for more
1. Edit the Expression
2. Expand the Character folder
3. Select the Initcap function
4. Double-click the function to add it
to the Formula
225
Working with Data
1. Edit the Formula so that it matches the one above.
Remember CUST_NAME is the input being
modified, CUST_NAME_OUT is the result
2. Press OK to close the editor
This is a simple expression telling
PowerCenter capitalize the first letter of
the customer first and last name.
226
Working with Data
Repeat for PRODUCT_DESC_OUT
1. Press the down arrow to open the Expression Editor
227
Working with Data
1. Select the Initcap function
2. Edit the Formula so it matches
the one above
3. Press OK
228
Working with Data
1. Click the row number at left and use the black arrows
to move the row up or down in the list
This is how the fields should look now. For
housekeeping purposes, move the fields directly
below the fields with which they correspond.
229
Working with Data
1. Validate that the Ports are in the proper order
2. Press OK
230
Working with Data
1. Validate the mapping – it should look like this
2. Open the Navigation Pane
Next we need to format our date. In our flat
file, the date is an 8 character string. We
need to convert that string to a date format so
that it matches the format the target database
(Oracle) is expecting
231
Working with Data
1. Select the Transformation Developer
2. Expand the Transformations folder in the
left Navigation pane
3. Drag the exp_formatted_date
transformation onto the workspace
4. Double-click the transformation to edit it
exp_formatted_date is a
sharable, re-usable
transformation
232
Working with Data
1. Select the Ports tab
2. Open the Expression Editor for the
formatted_date port
233
Working with Data
1. Review the expression formula
2. Press OK
3. Press OK on the next screen to close
the Edit Transformations window
234
Working with Data
1. Right click on the transformation
2. Select Dependencies
Because this is a reusable transformation, any changes we make
will propagate to every mapping that uses the transformation. We
may want to know what mappings include this transformation before
we change it. To do this we run a dependency report.
235
Working with Data
1. Select any Object Types that should be
included in the report
2. Press OK
236
Working with Data
1. Review the report content. In this
case there are no dependencies.
2. Close the report
237
Working with Data
1. Click and drag the exp_formatted_date
expression to the workspace
238
Working with Data
1. Link the DATEOFTRANSACTION port to the
DATE_IN port on the new Expression
Transformation
2. Add an Aggregator to our mapping
239
Working with Data
We need to calculate the total revenue for each
customer. The Aggregator transformation performs these
types of functions on groups of data. It can also help
collapse records based on a grouping criteria (CUST_ID
in this case), eliminating duplicate sets of results
240
Working with Data 1. Map the output ports from the
two expressions to the
Aggregator transformation
2. Minimize the Expressions
now we are done with them
3. Double-click the Aggregator
to edit the transformation
properties
241
Working with Data
Rename the Aggregator Transformation
1. Click Rename
2. Name the transformation agg_revenue
242
Working with Data
Update port names and build the aggregate
calculation
1. Select the Ports tab
2. Remove the “_OUT” from the CUST_NAME
and PRODUCT_DESC ports
3. Click Add new port button once
A new port is added to the Aggregator
243
Working with Data
1. Rename NEWFIELD to TOTAL_REVENUE
2. Change the Datatype to Double
3. De-select the “I” so the Expression Editor
becomes available
4. Click the arrow to open the Expression Editor
244
Working with Data
1. Build the expression shown above
2. Press OK
245
Working with Data
Our calculation computes the total revenue by customer. To
accomplish this, data needs to be grouped by Customer ID
1. Check the GroupBy box for the CUST_ID port
2. Press OK
246
Working with Data We are ready to map the fields
from the aggregator to the
GOOD_CUSTOMERS table
1. Select the relevant ports from the Aggregator
2. Map the selected fields to the matching ports on the
GOOD_CUSTOMERS target table
247
Working with Data We want to map three of the fields in the
Aggregator to our second target,
CUSTOMER_DATES. The CUST_ID field
will go to both targets.
1. Select the relevant ports from the Aggregator to map to
CUSTOMER_DATES
2. Connect the selected fields to the matching ports on the target table
248
Working with Data
Almost done. Let’s apply the finishing touches.
1. Save the mapping
2. Verify the mapping is VALID
3. Clean up. Right click anywhere in the
workspace, select Arrange All Iconic
249
Working with Data
Congratulations!
You are now ready to load your
data into the Data Warehouse.
250
Lab 4: 1 hr
251
Using the Debugger
252
What will we learn in this chapter?
• What is the Debugger?
• How do we use the Debugger?
• What are the advantages of using the Debugger?
• What are some of the options in the Debugger?
253
In this Scenario…
As a developer you want to test the mapping you
built prior to running the data to ensure that the
logic in the mapping will work.
For this lab we will use a pre-built mapping to
review the features of the Debugger
254
Step-by-step Overview
1. Open the Debugger lab folder
2. Run the Debugger
3. Configure the Session with the Debugger Wizard
4. Edit Breakpoints
5. Step through the mapping
6. Monitor results
255
Using the Debugger
Open the DebuggerLab
1. Right-click on DebuggerLab folder and select Open
256
Using the Debugger
1. Open the Mapping Designer
2. Expand the Mappings Folder
3. Drag M_DebuggerLab to the Mapping Designer workspace
257
Using the Debugger
Start Debugger
Stop the Debugger
Next Instance
Step to Instance
Show Current Instance
Continue
Break Now
Edit Breakpoints
Debugger Toolbar
258
1. Start the Debugger
Using the Debugger
259
1. Review the pre-requisites
2. Press Next
Using the Debugger
260
1. Select the Int_Workshop_Service as
the Integration Service on which to
run the debug session
2. Leave the defaults
3. Click Next
Using the Debugger
261
1. Choose the Source and Target
database connection
2. Leave the default values of Source
and Target
3. Click Next
Using the Debugger
262
Configure Session parameters.
No change.
1. Click Next
Using the Debugger
263
Configure Session parameters.
No change.
1. Click Next
Using the Debugger
264
Using the Debugger
Do we want to physically load the table or roll back
the data before commit in the debug session?
In this case we just want to test the mapping, not
actually load the data.
Configure Session parameters
1. Check Discard target data
2. Click Finish to start the session
265
Using the Debugger
Let’s adjust the tool bars so it is easier to work
with the Debugger.
1. Right click on the tool bar and unselect the
Advanced Transformations tool bar
2. Repeat and select Debugger so the toolbar is
visible
266
Using the Debugger
1. Select “Edit Breakpoints” to establish
breakpoints to stop the debug session at
specific transformations
267
We want to establish a breakpoint at the Expression Transformation
1. Select the EXPTRANS object
Using the Debugger
268
1. Select the Add button to create a breakpoint at the expression
transformation
2. Under Condition, click the Add box to set the breakpoint rules
3. Edit the rule so that it will stop when CUST_ID = 325
4. Click OK
Using the Debugger
269
1. Notice the “Stop Sign” Breakpoint set at
EXPTRANS Transformation
Using the Debugger
270
Target Instance
Window
Transformation
Instance
Data Window
Output Window –
Debugger or
Session Log
Debugger
Menu Using the Debugger
Breakpoint
271
Next Instance
Examine values See Output
From the Debugger Toolbar
1. Click Next Instance to step into the mapping
2. Review values and outputs in the debug panes
3. Continue to step through and monitor changes
Using the Debugger
272
1. Click Next
Instance until 9
records have been
processed.
2. Monitor Output
below
3. Click Stop the
Debugger
Using the Debugger
273
When the Debugger closes, Designer
returns to the normal design view
1. Note the “shutdown complete” message
in the output window
Using the Debugger
274
Additional Informatica
Resources
275
Informatica Community my.informatica.com
276
My.informatica.com Assets
• Searchable knowledge base
• Online support and service request management
• Product documentation and demos
• Comprehensive partner sales, support and training tools
• Velocity – Informatica’s implementation methodology
• Educational services offerings
• Mapping Templates
• Link to devnet
• Many more …
277
Developer Network devnet.informatica.com
278
Informatica Partner Enablement Presales and Implementation Roles
279
Welcome to
• What is beINFORMed?
• Informatica‘s Partner Home
• A variety of online tools and resources to help you sell and deliver
Informatica solutions
• Answers your Informatica questions
• Available 24 hours 7 days a week
• Where is beINFORMed?
• URL: http://partners.informatica.com/
280
How to Register ... http://partners.informatica.com
Log in and “Register
Today” as a “NEW
USER". The system will
lead you through the
application process
When you login,
you can change
your password
281
What does beINFORMed Offer?
• Enablement
Become an expert on selling Informatica, positioning Informatica solutions and implementing Informatica technology. Follow well-defined “learning paths” for your role (sales, presales, implementation) to become enabled.
• Software
Ensuring that you are successful with the deployment of the Informatica platform, we offer you internal training and demonstration software.
• Resource Center
A one-stop shop for technical, marketing, and sales information around Informatica's products, solutions and programs.
• Manage Sales Leads and Register for Referral Fees
You can always use a little extra help when it comes time to meet with your customer...we're here to support you.
• Marketing Center Review and participate in joint programs to drive pipeline
282
beINFORMed What It Looks Like
Increase your
Informatica skills
Request
software
Log your
opportunities
Find resources
Do joint
marketing
283
beINFORMed Submit and Manage Software Requests
Submit Requests
Track approval
through
fulfillment
284
beINFORMed Enablement Paths – Your Steps to Success
Increase your
selling skills
Understand
solutions
Hone your
technical,
hands-on Skills
Fast,
comprehensive
solution
information
285
beINFORMed Current Pre-Sales Enablement Paths
Solution Basics Demos and
Positioning Support & Awareness
INFORMATICA
• Chalktalk eLearnings
• Download software
• Solution Positioning
Presentations
• Topical INFOCenters
• Chalktalk eLearnings
• Demos / recordings
• Solution Starter kits
• POC requirements docs
• 24x7 Support
• Solution Webinar series
DELIVERY
beINFORMed
beINFORMed
SC workshops
VMWare Image
Phone / email support
SC pairing/mentoring
286
Silver Accreditation Gold Accreditation Platinum Accreditation
Presales Accreditation on Platform, DI, DQ, MDM and other Informatica Solution Areas
Presentation and Positioning
Expert
Demo and Presentation Expert POC, Demo and Presentation
Expert
DELIVERY
beINFORMed
Alliances Webinar Series
Solution InfoCenters
eLearnings
beINFORMed
Solution InfoCenters
Online SC Webinars
eLearnings
Demo Recordings/Scripts
Modular Web-based
consumption
beINFORMed
Solution InfoCenters
SC Bootcamps
VMWare-based POC scenarios
POC reviews and validation
POC Shadowing
Success Measures
2010 Manual review process
2011 Automated review
process per solution area
2010 Manual review process
2011 Automated review
process per solution area
2010 Manual review process
2011 Automated review process
per solution area
beINFORMed Presales Accreditation – 2010-2011 Next Steps
287
beINFORMed (From Enablement Page)
Solutions at your finger tips
288
beINFORMed Comprehensive Resource Center
Find hot
information,
collateral, demos
Search by
category or
solution area
289
beINFORMed Implementer Enablement Paths – Data Quality
Follow the
Initial Steps
Identify proper
Education
Stay in touch,
resolve issues
290
Step 1 – QuickStart
6 eLearnings Quickstart, MetaData Manager, New Features, Unified
Security, Data Analyzer, Real-Time eLearning
Software Download Software for Training or evaluation purposes
Guides Installation Guide, Getting Started
Documentation Install Guide, Getting Started Guide, User Guide
Demos Real-Time Edition, MetaData Manager, Data Masking
291
Step 2 – Education Global Education Services
PowerCenter 8.x - Level 1 Developer • 4 day course (Virtual or classroom based) - More Details >>
PowerCenter 8.x - Level 2 Developer • 4 day course (Virtual or classroom based) - More Details >>
PowerCenter 8.X+ Administration • 4 day course (Virtual or classroom based) – More Details >>
Metadata Manager 8.6
• 3 day course (Virtual or classroom based) – More Details >>
292
Step 3 – Services
During Projects you can use the following services
Global Customer Support – 24 x 7 support Raise service request via Email / web
Search our knowledge base via http://my.informatica.com
Phone (North America: +1 866 563 6332)
Professional Services For initial engagements – DI experts can be contracted
To compliment your team
Velocity Methodology Available for Partners, Informatica Best
Practices – Search with “Velocity” on beINFORMed
PowerCenter Baseline Architecture
PowerExchange CDC Deployment for Mainframe Systems
Data Migration Jumpstart
293
Step 4 – Certification Global Education Services
Informatica Certified Developer PowerCenter QuickStart eLearning
PowerCenter 8.X+ Administrator course
PowerCenter Developer 8.x Level I course
PowerCenter Developer 8 Level II course
Three Exams
Informatica Certified Consultant PowerCenter QuickStart eLearning
PowerCenter 8.X+ Administrator course
PowerCenter Developer 8.x Level I course
PowerCenter Developer 8 Level II
Five Exams
294
beINFORMed Lead Management – Opportunity to Close
Log your
opportunities
Register Leads
Obtain Sales
Support
Collaborate
with Alliances
Report on joint
pipeline-
Receive
Referral Fees
295
beINFORMed Joint Marketing– Leverage Existing Programs and Content
Find Marketing
Info &
Opportunities
Do joint PR
Download
Programs
In a Box
296
Putting it all together
297
Suggested Naming Conventions
• Targets – T_TargetName.
• Mappings – m_MappingName.
• Sessions – s_MappingName.
• Workflows – wf_WorkflowName
• Transformations (in a mapping) – two or three
letter transformation abbreviation followed by name
Expression = exp_ExpressionName
Some Examples. A more complete set of
transformation naming conventions can be found
in the Appendix C at the end of this Guide
298
In this Scenario…
• You are the regional manager for a series of car
dealerships. Management has asked you to
track the progress of your employees.
Specifically, you need to capture:
• Employee name
• Name of the dealership they work at
• What they have sold
• How much they have sold (net revenue)
299
Step-by-step Overview
1. Create a new target definition to use in the mapping, and create
a target table based on the new target definition.
2. Create a mapping using the new target definition. You will add
the following transformations to the mapping:
• Lookup transformation. Finds the name of the employees, dealerships
they work at, and all products they have sold.
• Aggregator transformation. Calculates the net revenue that the
employee has sold.
• Expression transformation. Format all employees names and product
descriptions.
3. Create a workflow to run the mapping in the Workflow Manager
4. Monitor the workflow in the Workflow Monitor
300
Step 1: Sources and Targets
1. Open up the MappingLab folder
2. Use the mm_data user (user_id/password:
mm_data/mm_data) to bring in the mm_transactions table
3. Create your own Oracle target in the Target Designer in the
target instance in Oracle
• Target should be named T_Employee_Summary
• Columns should include:
• EMP_NAME (varchar2, length 50, primary key)
• PRODUCT_SOLD (varchar2, length 50)
• DEALERSHIP (varchar2, length 50)
• NET REVENUE (number)
301
Step 2: Mapping
1. Open up Mapping Designer
2. Create a new mapping – call it whatever you like
3. Bring in mm_transaction source and T_Employee_Summary target
4. Find dealership name (hint: Use the mm_data user as all dealerships names are kept in the mm_dealership table)
5. Find product description (hint: Use mm_data user as all product descriptions are kept in the mm_product table)
6. Find employee name (hint: Use mm_data user as all employees names are kept in the mm_employees table)
7. Format the employee name and make sure the name is capitalized
8. Format the product description and make sure the initial letters are capitalized
9. Calculate net revenue (hint: keep it simple, net revenue is revenue – cost)
10.Group by Employee_ID to collapse all unique employees
11.Map to target table
302
Step 3: Build the workflow
1. Open Workflow Manager
2. Create a new workflow
3. Use a session task to execute mapping
4. Configure session task
5. Execute mapping
303
Step 4: Monitor workflow
1. Open Workflow Monitor
2. Monitor workflow
3. Debug using session log as necessary
4. Preview data to be sure it worked properly
• Hint: To preview data, go to Designer open up
Target Designer right click on
T_Employee_Summary select Preview Data
enter username and password (target/target)
304
Thank You!
305
Appendix A – PowerCenter Transformations
306
Transformation Objects Transformation Description
Aggregator Performs aggregate calculations.
Application Source Qualifier
Represents the rows that the PowerCenter Server reads from an application,
such as an ERP source, when it runs a session.
Custom Calls a procedure in a shared library or DLL.
Data Masking
Replaces sensitive production data with realistic test data for non-production
environments.
Expression Calculates a value.
External Procedure Calls a procedure in a shared library or in the COM layer of Windows.
Filter Filters data.
HTTP Connects to an HTTP server to read or update data.
Input Defines mapplet input rows. Available in the Mapplet Designer.
Java
Executes user logic coded in Java. The byte code for the user logic is stored in
the repository.
Joiner Joins data from different databases or flat file systems.
Lookup Looks up values.
Normalizer
Source qualifier for COBOL sources. Can also use in the pipeline to normalize
data from relational or flat file sources.
Output Defines mapplet output rows. Available in the Mapplet Designer.
Rank Limits records to a top or bottom range.
307
Transformation Objects
Transformation Description
Router Routes data into multiple transformations based on group conditions.
Sequence Generator Generates primary keys.
Sorter Sorts data based on a sort key.
Source Qualifier Represents the rows that the PowerCenter Server reads from a relational or flat file
source when it runs a session.
SQL Executes SQL queries against a database.
Stored Procedure Calls a stored procedure.
Transaction Control Defines commit and rollback transactions.
Union Merges data from different databases or flat file systems.
Unstructured Data Transforms data in unstructured and semi-structured formats.
Update Strategy Determines whether to insert, delete, update, or reject rows.
XML Generator Reads data from one or more input ports and outputs XML through a single output
port.
XML Parser Reads XML from one input port and outputs data to one or more output ports.
XML Source Qualifier Represents the rows that the Integration Service reads from an XML
source when it runs a session.
308
Appendix B – PowerCenter Functions
309
Aggregate Functions
Function Description
AVG Returns the average of all values in a group.
COUNT Returns the number of records with non-null value, in a group.
FIRST Returns the first record in a group.
LAST Returns the last record in a group.
MAX Returns the maximum value, or latest date, found in a group.
MEDIAN Returns the median of all values in a selected port.
MIN Returns the minimum value, or earliest date, found in a group.
PERCENTILE Calculates the value that falls at a given percentile in a group of numbers.
STDDEV Returns the standard deviation for a group.
SUM Returns the sum of all records in a group.
VARIANCE Returns the variance of all records in a group.
310
Character Functions
Function Description
ASCII
In ASCII mode, returns the numeric ASCII value of the first character of the string
passed to the function.
In Unicode mode, returns the numeric Unicode value of the first character of the
string passed to the function.
CHR Returns the ASCII or Unicode character corresponding to the specified numeric
value.
CHRCODE
In ASCII mode, returns the numeric ASCII value of the first character of the string
passed to the function.
In Unicode mode, returns the numeric Unicode value of the first character of the
string passed to the function.
CONCAT Concatenates two strings.
INITCAP Capitalizes the first letter in each word of a string and converts all other letters to
lowercase.
INSTR Returns the position of a character set in a string, counting from left to right.
311
Function Description
LENGTH Returns the number of characters in a string, including trailing blanks.
LOWER Converts uppercase string characters to lowercase.
LPAD Adds a set of blanks or characters to the beginning of a string, to set a string to a
specified length.
LTRIM Removes blanks or characters from the beginning of a string.
METAPHONE Encodes characters of the English language alphabet (A-Z). It encodes both uppercase
and lowercase letters in uppercase.
REPLACECHR Replaces characters in a string with a single character or no character.
REPLACESTR Replaces characters in a string with a single character, multiple characters, or no
character.
RPAD Converts a string to a specified length by adding blanks or characters to the end of the
string.
RTRIM Removes blanks or characters from the end of a string.
SOUNDEX
Works for characters in the English alphabet (A-Z). It uses the first character of the input
string as the first character in the return value and encodes the remaining three unique
consonants as numbers.
SUBSTR Returns a portion of a string.
UPPER Converts lowercase string characters to uppercase.
Character Functions (cont’d)
312
Conversion Functions
Function Description
TO_BIGINT Converts a string or numeric value to a bigint value.
TO_CHAR Converts numeric values and dates to text strings.
TO_DATE Converts a character string to a date datatype in the same format as the character
string.
TO_DECIMAL Converts any value (except binary) to a decimal.
TO_FLOAT Converts any value (except binary) to a double-precision floating point number (the
Double datatype).
TO_INTEGER Converts any value (except binary) to an integer by rounding the decimal portion of a
value.
313
Data Cleansing Functions
Function Description
GREATEST Returns the greatest value from a list of input values
IN Matches input data to a list of values
INSTR Returns the position of a character set in a string, counting from left to right.
IS_DATE Returns whether a value is a valid date.
IS_NUMBER Returns whether a string is a valid number.
IS_SPACES Returns whether a value consists entirely of spaces.
ISNULL Returns whether a value is NULL.
LEAST Returns the smallest value from a list of input values.
LTRIM Removes blanks or characters from the beginning of a string.
METAPHONE Encodes characters of the English language alphabet (A-Z). It encodes both
uppercase and lowercase letters in uppercase.
314
Data Cleansing Functions (cont’d)
Function Description
REG_EXTRACT Extracts subpatterns of a regular expression within an input value
REG_MATCH Returns whether a value matches a regular expression pattern
REG_REPLACE Replaces characters in a string with a another character pattern.
REPLACECHR Replaces characters in a string with a single character or no character
REPLACESTR Replaces characters in a string with a single character, multiple characters, or no
character.
RTRIM Removes blanks or characters from the end of a string.
SOUNDEX Encodes a string value into a four-character string.
SUBSTR Returns a portion of a string.
TO_BIGINT Converts a string or numeric value to a bigint value.
TO_CHAR Converts numeric values and dates to text strings.
TO_DATE Converts a character string to a date datatype in the same format as the character string.
TO_DECIMAL Converts any value (except binary) to a decimal.
TO_FLOAT Converts any value (except binary) to a double-precision floating point number (the
Double datatype).
TO_INTEGER Converts any value (except binary) to an integer by rounding the decimal portion of a
value.
315
Function Description
ADD_TO_DATE Adds a specified amount to one part of a date/time value, and returns a date in
the same format as the specified date.
DATE_COMPARE Returns a value indicating the earlier of two dates.
DATE_DIFF Returns the length of time between two dates, measured in the specified
increment (years, months, days, hours, minutes, or seconds).
GET_DATE_PART Returns the specified part of a date as an integer value, based on the default
date format of MM/DD/YYYY HH24:MI:SS.
IS_DATE Returns whether a string value is a valid date.
LAST_DAY Returns the date of the last day of the month for each date in a port.
MAKE_DATE_TIME Returns the date and time based on the input values
ROUND Rounds one part of a date.
SET_DATE_PART Sets one part of a date/time value to a specified value.
TO_CHAR (DATE) Date/Time datatype. Passes the date values you want to convert to character
strings
TRUNC Truncates dates to a specific year, month, day, hour, or minute.
Date Functions
316
Encoding Functions
Function Description
AES_DECRYPT Returns encrypted data to string format
AES_ENCRYPT Returns data in encrypted format
COMPRESS Compresses data using the zlib compression algorithm
CRC32 Returns a 32-bit Cyclic Redundancy Check (CRC32) value
DEC_BASE64 Decodes the value and returns a string with the binary data representation of the data
DECOMPRESS Decompresses data using the zlib compression algorithm
ENC_BASE64 Encodes data by converting binary data to string data using Multipurpose Internet
Mail Extensions (MIME) encoding
MD5 Calculates the checksum of the input value. The function uses Message-Digest
algorithm 5 (MD5)
317
Financial Functions
Function Description
FV Returns the future value of an investment, where you make periodic, constant
payments and the investment earns a constant interest rate
NPER Returns the number of periods for an investment based on a constant interest rate and
periodic, constant payments
PMT Returns the payment for a loan based on constant payments and a constant interest
rate
PV Returns the present value of an investment
RATE Returns the interest rate earned per period by a security
318
Numeric Functions
Function Description
ABS Returns the absolute value of a numeric value.
CEIL Returns the smallest integer greater than or equal to the specified numeric value.
CONVERT_BASE Converts a number from one base value to another base value
CUME Returns a running total of all numeric values.
EXP Returns e raised to the specified power (exponent), where e=2.71828183.
FLOOR Returns the largest integer less than or equal to the specified numeric value.
LN Returns the natural logarithm of a numeric value.
LOG Returns the logarithm of a numeric value.
MOD Returns the remainder of a division calculation.
MOVINGAVG Returns the average (record-by-record) of a specified set of records.
MOVINGSUM Returns the sum (record-by-record) of a specified set of records.
POWER Returns a value raised to the specified exponent.
RAND Returns a random number between 0 and 1
ROUND Rounds numbers to a specified digit.
SIGN Notes whether a numeric value is positive, negative, or 0.
SQRT Returns the square root of a positive numeric value.
TRUNC Truncates numbers to a specific digit.
319
Scientific Functions
Function Description
COS Returns the cosine of a numeric value (expressed in radians).
COSH Returns the hyperbolic cosine of a numeric value (expressed in radians).
SIN Returns the sin of a numeric value (expressed in radians).
SINH Returns the hyperbolic sin of a numeric value (expressed in radians).
TAN Returns the tangent of a numeric value (expressed in radians).
TANH Returns the hyperbolic tangent of a numeric value (expressed in radians).
320
Special Functions
Function Description
ABORT Stops the session and issues a specified error message.
DECODE Searches a port for the specified value.
ERROR Causes the PowerCenter Server to skip a record and issue the specified error message.
IIF Returns one of two values you specify, based on the results of a condition.
LOOKUP Searches for a value in a lookup source column.
Informatica recommends using the Lookup transformation.
321
String Functions
Function Description
CHOOSE Chooses a string from a list of strings based on a given position.
INDEXOF Finds the index of a value among a list of values.
REVERSE Reverses the input string.
322
Test Functions
Function Description
IS_DATE Returns whether a value is a valid date..
IS_NUMBER Returns whether a string is a valid number.
IS_SPACES Returns whether a value consists entirely of spaces.
ISNULL Returns whether a value is NULL.
323
Variable Functions
Function Description
SETCOUNTVARIABLE Counts the rows evaluated by the function and increments the current value
of a mapping based on the count.
SETMAXVARIABLE
Sets the current value of a mapping variable to the higher of two values:the
current value of the variable or the value specified. Returns the new current
value.
SETMINVARIABLE
Sets the current value of a mapping variable to the lower of two values: the
current value of the variable or the value specified. Returns the new current
value.
SETVARIABLE Sets the current value of a mapping variable to a value you specify. Returns
the specified value.
SYSTIMESTAMP Returns the current date and time of the node hosting the Integration Service
with precision to the nanosecond.
324
Appendix C – Transformation Naming Conventions
325
Transformation Naming Each object in a PowerCenter repository is identified by a unique name.
This allows PowerCenter to efficiently manage and track statistics all
the way down to the object level.
When an object is created, PowerCenter automatically generates a
unique name. These names, however, do not reflect project/repository
specific context. As a best practice Informatica recommends the
following convention for naming PowerCenter objects:
<Object Type Abbreviation>_<Descriptive Name>
Abbreviations are usually 1 – 3 letters, the minimum needed to easily
identify the object type. For example:
agg_quarterly_total (an aggregator that computes a quarterly totals)
m_load_dw (a mapping that loads the datawarehouse)
exp_string_to_date (an expression that converts a string to a date)
326
Suggested Naming Conventions
Transformation Suggested Convention
Aggregator AGG_TransformationName
Application Source Qualifier ASQ_TransformationName
Custom CT_TransformationName
Expression EXP_TransformationName
External Procedure EXT_TransformationName
Filter FIL_TransformationName
Joiner JNR_TransformationName
Lookup LKP_TransformationName
MQ Source Qualifier SQ_MQ_TransformationName
Normalizer NRM_TransformationName
Rank RNK_TransformationName
327
Suggested Naming Conventions
Transformation Suggested Convention
Router RTR_TransformationName
Sequence Generator SEQ_TransformationName
Sorter SRT_TransformationName
Stored Procedure SP_TransformationName
Source Qualifier SQ_TransformationName
Transaction Control TC_TransformationName
Union UN_TransformationName
Update Strategy UPD_TransformationName
XML Generator XG_TransformationName
XML Parser XP_TransformationName
XML Source Qualifier XSQ_TransformationName
328
Lesson 6: Lab - homework