Using PIVOT stages

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
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Using PIVOT stages

Post by gpbarsky »

Hi there.

I would like to know how can I use a PIVOT stage. I didn't find any information on the help manuals.

Thanks in advance :D
Guillermo P. Barsky
Buenos Aires - Argentina
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you look in the directory where you installed the DataStage client, there is a "Docs" directory under it. In there are pdfs for all of the plugin stages, including the pivot stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Post by gpbarsky »

Craig:

Thank you for your answer, but I didn't find any information on the manuals (*.pdf) that I have installed in my PC.

Could you send me the PDF containing this information ? My e-mail is gbarsky@osde.com.ar.

Thanks in advance.
Guillermo P. Barsky
Buenos Aires - Argentina
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm sorry! They exist in my Docs directory because I put them there. :oops:

The pdfs for the plugin stages are included in the server install folders on your cdrom. Drill down thru that and you should find them. If you still can't turn them up, I'll email it to you tomorrow.
-craig

"You can never have too many knives" -- Logan Nine Fingers
degraciavg
Premium Member
Premium Member
Posts: 39
Joined: Tue May 20, 2003 3:36 am
Location: Singapore

Re: Using PIVOT stages

Post by degraciavg »

gpbarsky wrote:Hi there.

I would like to know how can I use a PIVOT stage. I didn't find any information on the help manuals.

Thanks in advance :D
hi,

briefly, the Pivot stage is simply a one-way "transpose" stage - used for transposing your columns into rows only. you can't use it to transpose rows into columns (i use the aggregator stage to do this... but it works only on a certain conditions).

to use it,
1. put all the columns you want to transpose into the input tab
2. put the target column in the output tab
3. in the derivation column, add the columns to transpose separated by commas.

hth,
vladimir
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

There are two ways to pivot data. One is horizontal and the other is vertical. DS supports a horizontal pivot (one to many rows) and does not support a vertical (many rows to one).

I believe the on-line help would be sufficient for you to gain a basic understanding of the pivot stage and can be accessed if you choose help from the pivot stage via the designer.

Regards,

Michael Hester
mjeaslea
Participant
Posts: 1
Joined: Tue Jun 01, 2004 7:48 am
Location: Australia
Contact:

Performance

Post by mjeaslea »

mhester wrote:There are two ways to pivot data. One is horizontal and the other is vertical. DS supports a horizontal pivot (one to many rows) and does not support a vertical (many rows to one).

I believe the on-line help would be sufficient for you to gain a basic understanding of the pivot stage and can be accessed if you choose help from the pivot stage via the designer.

Regards,

Michael Hester
Hi, i'm wondering about the performance of the Pivot operation. I need to translate about 20 million rows from an Oracle 8 Database into an SQL Server 2000 database regularly.

What sort of SQL does the pivot step generate?

Cheers
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

The pivot step does not generate any SQL, you will have to link the output from your pivot stage to a database stage either using an insert/update stage or using the faster bulk load stage.

Performance will be improved if you can run multiple instances of your job where each job filters based on a field that will not split up individual pivot record groups. It will also be much faster if you can put in change data detection where you only process changed data at regular intervals.
Post Reply