O'Reilly logo

SAP Data Services 4.x Cookbook by Ivan Shomnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transforming data with the Pivot transform

The Pivot transform belongs to the Data Integrator group of transform objects, which are usually all about generation or transformation (changing the structure) of data. Simply put, the Pivot transform allows you to convert columns into rows. Pivoting transformation increases the number of rows in the dataset as for each column converted into a row, an extra row is created for every key (non-pivoted column) pair. Converted columns are called pivot columns.

Getting ready

Run the SQL following statements against the AdventureWorks_OLTP database to create a source table and populate it with data:

create table Sales.AccountBalance ( [AccountID] integer, [AccountNumber] integer, [Year] integer, [Q1] decimal(10,2), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required