Sunday, October 14, 2012

Sequence Generator transformation:

  • Sequence Generator transformation is Passive and Connected Transformation.
  • The Sequence Generator transformation generates numeric values. Use the Sequence Generator to create unique primary key values, replace missing primary keys, or cycle through a sequential range of numbers.
  • We use it to generate Surrogate Key in Data Ware House environment mostly. When we want to maintain history, then we need a key other than Primary Key to uniquely identify the record. So we create a Sequence 1,2,3,4 and so on. We use this sequence as the key. 
    • For example: If EMPNO is the key, we can keep only one record in target and can’t maintain history. So we use Surrogate key as Primary key and not EMPNO.
Sequence Generator Ports:
  • The Sequence Generator transformation provides two output ports: NEXTVAL and CURRVAL.
  • We cannot edit or delete these ports.
  • Likewise, we cannot add ports to the transformation.
  • NEXTVAL: Use the NEXTVAL port to generate sequence numbers by connecting it to a transformation or target.
    • For example, we might connect NEXTVAL to two target tables in a mapping to generate unique primary key values.
  • CURRVAL: CURRVAL is NEXTVAL plus the Increment By value.
    • We typically only connect the CURRVAL port when the NEXTVAL port is already connected to a downstream transformation.
  • If we connect the CURRVAL port without connecting the NEXTVAL port, the Integration Service passes a constant value for each row.
  • When we connect the CURRVAL port in a Sequence Generator transformation, the Integration Service processes one row in each block. We can optimize performance by connecting only the NEXTVAL port in a mapping.
Points to remember:
  • If Current value is 1 and end value 10, no cycle option. There are 17 records in source. In this case session will fail.
  • If we connect just CURR_VAL only, the value will be same for all records.
  • If Current value is 1 and end value 10, cycle option there. Start value is 0. There are 17 records in source. Sequence: 1 2 – 10. 0 1 2 3 –
  • To make above sequence as 1-10 1-20, give Start Value as 1. Start value is used along with Cycle option only.
  • If Current value is 1 and end value 10, cycle option there. Start value is 1. There are 17 records in source. Session runs. 1-10 1-7. 7 will be saved in repository. If we run session again, sequence will start from 8.
  • Use reset option if you want to start sequence from CURR_VAL every time.

11 comments:

  1. Best Informatica Training by TOP Industry Experts in Delhi/NCR with 100% Job Oriented & Placement Record.

    Free 1st Demo Class, Fresh Batch Start from Nov-2014 Call to Book Your Seat Now : 08447037614/09910840204, info@ambrot.com

    ReplyDelete
  2. Are you really want to know about the basic question of informatics and data analysis please follow us at :- The questionnaires are studied and informatica scenario based questions prepared by professionals who are related to this field. With this website you can get an overview about all details and concept related to the topic that can help them to learn each and every data warehouse interview questions concept clearly.

    ReplyDelete
  3. This is very informative and this is very usefull to us.

    Informatica online training , informatica training in bangalore

    informatica online training , informatica training in bangalore , informatica training , informatica online trainig in bangalore

    ReplyDelete
  4. Nice explanation

    Best Informatica Online Training By 9+Years Of Realtime Expert

    Below is the link for Course Content and Demo Class

    https://informaticaonlinetraing.blogspot.com

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. Very Informative! This blog is great source of information which is very useful for me. Thank you very much for sharing this!
    Power transformers in India | Transformer Manufacturer in India

    ReplyDelete
  7. Really Good blog post.provided a helpful information.I hope that you will post more updates like this Informatica Online Training Hyderabad

    ReplyDelete
  8. Thank you so much for highlighting the usage of Informatica and its other tools in such a proper manner.

    Informatica Read JSON

    ReplyDelete
  9. Sequence Generator Transformation" is a data integration tool. This term suggests generating sequential values for unique identification. Can Rent Movie Used in ETL processes, it ensures each row receives a distinct identifier.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...