15
1 Unit 12. Dynamic Lookup and Error Logging Unit 12

PowerCenter Level1 Unit12

Embed Size (px)

DESCRIPTION

Presentation of PowerCenter Level 1 Labs Unit12

Citation preview

Page 1: PowerCenter Level1 Unit12

1

Unit 12. Dynamic Lookup and Error Logging

Unit 12

Page 2: PowerCenter Level1 Unit12

2

Unit Objectives

• Understand why and how to use:• Dynamic Lookup cache

• Error logging

• Use these features in a mapping

Unit 12

Page 3: PowerCenter Level1 Unit12

3

Dynamic Lookup Cache

Dynamic Lookup Cache

Lookup Transformation

Write to target

Lookup

Target Table

Write to 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

Unit 12

Page 4: PowerCenter Level1 Unit12

4

Dynamic Lookup Cache Properties

Unit 12

Page 5: PowerCenter Level1 Unit12

5

Dynamic Lookup Cache Ports

Unit 12

Page 6: PowerCenter Level1 Unit12

6

NewLookupRow

Update Else Insert Option Row Found in Cache Lookup Cache Result NewLookupRow

Cleared (update only)Yes Update 2

No No change 0

SelectedYes Update 2

No Insert 1

Insert Else Update Option Row Found in Cache Lookup Cache Result NewLookupRow

Cleared (insert only)Yes No change 0

No Insert 1

SelectedYes Update 2

No Insert 1

NewLookupRow Description

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

1 The PowerCenter Server inserts the row into the cache.

2 The PowerCenter Server updates the row in the cache

Unit 12

Page 7: PowerCenter Level1 Unit12

7

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

Page 8: PowerCenter Level1 Unit12

8

Session Error Log Options

In Session task

Log Row DataLog Source Row Data

Error Log Type

Unit 12

Page 9: PowerCenter Level1 Unit12

9

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

Page 10: PowerCenter Level1 Unit12

10

Logging Errors to a Flat File

Format: Session metadata followed by de-normalized error information

Sample session metadata and row data format

Unit 12

Page 11: PowerCenter Level1 Unit12

11

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

Page 12: PowerCenter Level1 Unit12

12

Log Source Row Data

Source row logging

available

Source row loggingnot available

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

Unit 12

Page 13: PowerCenter Level1 Unit12

13

Unit 12 Lab Load Customer Dimension Table

StagingArea

DataWarehouse

STG_CUSTOMER(table)

DIM_CUSTOMER(table)

Create a mapping using:• Dynamic Lookup transformation• Update Strategy transformation• Error logging

Create/run a workflow for this mapping

Unit 12

Page 14: PowerCenter Level1 Unit12

14

Lab Review

• What did we accomplish with this lab?

• Questions?

Unit 12

Page 15: PowerCenter Level1 Unit12

15

Unit 12 Quiz

When would you use: Dynamic Lookup cache? Error logging?

Unit 12