Table of Contents

Search

  1. Preface
  2. Product Overview
  3. Before You Begin
  4. Tutorial Lesson 1
  5. Tutorial Lesson 2
  6. Tutorial Lesson 3
  7. Tutorial Lesson 4
  8. Tutorial Lesson 5
  9. Tutorial Lesson 6
  10. Appendix A: Naming Conventions
  11. Appendix B: Glossary

Getting Started

Getting Started

Creating a Sequence Generator Transformation

Creating a Sequence Generator Transformation

A Sequence Generator transformation generates unique values, such as primary keys, for a target in a mapping. You can also use it to cycle through a closed set of values. Many relational databases include sequences, which are special database objects that generate values. The Sequence Generator transformation functions like a sequence object in a database. However, in PowerCenter, you do not need to write SQL code to create and use the sequence in a mapping.
The Sequence Generator transformation has the following properties:
  • The starting number (normally 1).
  • The current value stored in the repository.
  • The number that the Sequence Generator transformation adds to its current value for every request for a new ID.
  • The maximum value in the sequence.
  • A flag indicating whether the Sequence Generator transformation counter resets to the minimum value once it has reached its maximum value.
The Sequence Generator transformation has two output ports, NEXTVAL and CURRVAL, which correspond to the two pseudo-columns in a sequence. When you query a value from the NEXTVAL port, the transformation generates a new value.
In the new mapping, you add a Sequence Generator transformation to generate IDs for the fact table F_PROMO_ITEMS. Every time the Integration Service inserts a new row into the target table, it generates a unique ID for PROMO_ITEM_ID.
  1. Create a Sequence Generator transformation and name it SEQ_PromoItemID.
  2. Open the Sequence Generator transformation.
  3. Click the
    Ports
    tab.
    The two output ports, NEXTVAL and CURRVAL, appear in the list.
    You cannot add any new ports to this transformation or reconfigure NEXTVAL and CURRVAL.
  4. Click the
    Properties
    tab.
    The properties for the Sequence Generator transformation appear. You do not have to change any of these settings.
  5. Click
    OK
    .
  6. Connect the NEXTVAL column from the Sequence Generator transformation to the PROMO_ITEM_ID column in the target table F_PROMO_ITEMS.
    The following image shows a link from the column NEXTVAL to the column PROMO_ITEM_ID:
    ""
  7. Click
    Repository
    Save
    .

0 COMMENTS

We’d like to hear from you!