Professional Documents
Culture Documents
PowerCenter Level1 Unit08
PowerCenter Level1 Unit08
Sequence Generator
Unit 8
Unit Objectives
Understand when and how to use the Sequence
Generator transformation
Use it in a mapping
Unit 8
Sequence Generator
Transformation
Generates unique keys for any port on a row
Passive
Ports
Two predefined output ports,
NEXTVAL and CURRVAL
No input ports
Usage
Generate sequenced keys
e.g. unique primary keys
Shareable across mappings
Unit 8
Use CURRVAL only if you need a second sequenced output (only increases when NEXTVAL used)
If you connect NEXTVAL to two transformations, it generates unique sequence number blocks
(first one, then the other)
Unit 8
Unit 8 Lab
Load Date Dimension Table
Create a mapping using:
Shortcuts for source and target
Sequence Generator transformation
Create/run a workflow for this mapping
Staging
Area
Data
Warehouse
STG_DATES
(table)
DIM_DATES
(table)
Unit 8
Lab Review
What did we accomplish with this lab?
Questions?
Unit 8
Unit 8 Quiz
1. When would you use the Sequence Generator
transformation?
2. What is the relationship between CURRVAL and
NEXTVAL?
Unit 8