regarding pivot stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Saama
Premium Member
Premium Member
Posts: 83
Joined: Wed Nov 22, 2006 6:42 pm
Location: Pune
Contact:

regarding pivot stage

Post by Saama »

hi,
as pivot stage transforms vertical rows into horizontal and vise versa.
i went through manual and found that these rows should have relationship.
i want to help my team lead to exactly analyze the working of pivot stage.
my source data has colums like
CUSTOMER ID PAYEMENT LOCATION. i see that these columns are independent, what happens when i use pivot stage as the i/p.
i will appreciate if somebody helps me in analyzing the pivot stage, and what happens when i use pivot stage.

cheers;
saama
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Firstly, your "and vice versa" is incorrect. The Pivot stage only performs horizontal pivoting (columns to rows). It does not perform vertical pivots.

The manual (pivot.pdf) gives a number of examples, and explains precisely how horizontal pivots work. I see no need to recapitulate that material here.

The only example it lacks, which I feel should be there, is one where a pivot key column is a constant (such as period names) added in an upstream Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi Saama,

Pivot stage by itself doesn't care about relationships between fields. As an ETL user you should take care of the given business rules to accomplish the task.
If you have multiple PAYEMENT LOCATION fields as PAYEMENT LOCATION1, PAYEMENT LOCATION2...for a same customer (CUSTOMER ID), the pivot of PAYEMENT LOCATION's against CUSTOMER ID will give you meaning full transformation. If you need to Pivot CUSTOMER ID and PAYEMENT LOCATION against another key column, you get a meaningless output unless PAYEMENT LOCATION at some condition refer to CUSTOMER ID or vise versa.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Saama
Premium Member
Premium Member
Posts: 83
Joined: Wed Nov 22, 2006 6:42 pm
Location: Pune
Contact:

Post by Saama »

Hi gurus,
Thanks very much.

cheers;
saama
Post Reply