You are on page 1of 15

Unit 12.

Dynamic Lookup and Error Logging

Unit 12

Unit Objectives
Understand why and how to use:
Dynamic Lookup cache
Error logging

Use these features in a mapping

Unit 12

Dynamic Lookup Cache


If the lookup table is the target table, the cache is changed
dynamically as target load rows are processed
New rows to be inserted or updated in the target are also written
to the cache
Dynamic
Lookup Cache
Lookup

Write to
cache

Lookup
Transformation

Write to
target

Unit 12

Target
Table

Dynamic Lookup Cache Properties

Unit 12

Dynamic Lookup Cache Ports

Unit 12

NewLookupRow
Insert Else Update Option

Row Found in Cache

Lookup Cache Result

NewLookupRow

Yes

No change

No

Insert

Yes

Update

No

Insert

Row Found in Cache

Lookup Cache Result

NewLookupRow

Yes

Update

No

No change

Yes

Update

No

Insert

Cleared (insert only)


Selected
Update Else Insert Option
Cleared (update only)
Selected
NewLookupRow

Description

The PowerCenter Server does not update or insert the row in the cache.

The PowerCenter Server inserts the row into the cache.

The PowerCenter Server updates the row in the cache

Unit 12

Error Types
Transformation error
Data row has only passed partway through the mapping

transformation logic
An error occurs within a transformation

Data reject
Data row is fully transformed according to the mapping

logic
Due to a data issue, it cannot be written to the target
A data reject can be forced by an Update Strategy

Unit 12

Session Error Log Options


In Session task

Error Log Type


Log Row Data
Log Source Row Data

Unit 12

Logging Errors to a Relational


Database
PMERR_SESS: Stores metadata about the session run
such as workflow name, session name, repository name etc
PMERR_MSG: Error messages for a row of data are logged
in this table
PMERR_TRANS: Metadata about the transformation such
as transformation group name, source name, port names
with datatypes are logged in this table
PMERR_DATA: The row data of the error row as well as the
source row data is logged here. The row data is in a string
format such as [indicator1: data1 | indicator2: data2]

Unit 12

Logging Errors to a Flat File

Format: Session
metadata followed
by de-normalized
error information

Sample session
metadata and row
data format

Unit 12

10

Logging Row Data and Source Row Data


Log Row Data logs:

Session metadata

Reader, transformation, writer and user-defined errors

Row data for I and I/O ports for errors on input

Row data for I/O and O ports for errors on output

Log Source Row Data logs:

Source row associated with the error row

Metadata about source, e.g. Source Qualifier, source row id, and source
row type

No source row logging downstream of active sources (where output rows


are not uniquely correlated with input rows)

Unit 12

11

Log Source Row Data


Source row logging is not available downstream of an
Aggregator, Joiner, Sorter (where output rows are not
uniquely correlated with input rows)
Source row logging
not available
Source row
logging
available

Unit 12

12

Unit 12 Lab
Load Customer Dimension Table
Create a mapping using:
Dynamic Lookup transformation
Update Strategy transformation
Error logging
Create/run a workflow for this mapping

Staging
Area

Data
Warehouse

STG_CUSTOMER
(table)

DIM_CUSTOMER
(table)

Unit 12

13

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

Unit 12

14

Unit 12 Quiz
When would you use:
Dynamic Lookup cache?
Error logging?

Unit 12

15

You might also like