Many thanks for visiting my Blog..!!Please share this blog using below share buttons and leave your Comments/Feedback/Appreciations on Tab: Feedback
Share This Blog..!!

Pivot Enterprise Stage: Horizontal Pivoting Steps

Pivot Enterprise stage Horizontal Pivot : DK®
This post will help you to implement pivot enterprise stage horizontal pivoting.

The Pivot Enterprise stage is a processing stage that pivots data horizontally and vertically.
Pivot Types:
  1.   Horizontal Pivot
  2.  Vertical Pivot
       
    Horizontal Pivoting Step by Step :DK®

Horizontal pivoting maps a set of columns in an input row to a single column in multiple output rows.
The output data of the horizontal pivot action typically has fewer columns, but more rows than the input data.DK®

Input Data Format: DK®
CUSTOMER_ID
CUSTOMER_NAME
JAN_EXPENSE
FEB_EXPENSE
MAR_EXPENSE
1
UMA
100
200
300
2
POOJITHA
200
300
400
Output Data:

CUSTOMER_ID
CUSTOMER_NAME
Q1EXPENSE
1
UMA
100
1
UMA
200
1
UMA
300
2
POOJITHA
200
2
POOJITHA
300
2
POOJITHA
400

Specify a horizontal operation in Pivot enterprise stage. DK®
Create basic datastage job using sequential file as input stage to read input data,Pivot Enterprise stage and sequential file stage as output to create output data. DK®
Basic Job Design: DK®




Configure sequential file stage as shown below to read input data(comma delimited input file) from sequential file or any different source.

Properties Tab in Details: DK®

Format Tab in Details: DK®

Columns Tab in Details: DK®

View Data in Details: DK®


2) Configure pivot enterprise stage. Double click on pivot enterprise stage and configure shown like below. *Go to the properties page and select Pivot Type = Horizontal

Pivot Enterprise Properties Tab in Details: DK®


Don't delete pivot index column :














This is your output..!





No comments:

Post a Comment

disqus