UnPivot Data Block

What is UnPivot transformation.

The unpivot transformation is a data manipulation operation commonly used in the context of databases or data analysis tools. It is the opposite of the pivot transformation and is also known as “melting” or “gathering” data. The purpose of unpivoting is to transform a dataset from a wide format to a long format, making it easier to analyze or visualize.

In a wide-format dataset, information is often organized in columns, with each column representing a different variable or category. However, in certain scenarios, it may be more convenient to have the data organized in a tall, or long, format where each row corresponds to a unique combination of identifiers, and a single column contains the variable values along with an additional column indicating the variable’s identity.

The unpivoting process typically involves selecting certain columns (variables) in the wide-format dataset and converting them into rows. The resulting long-format dataset often includes columns for identifiers, a column specifying the variable names, and a column containing the corresponding values. This restructuring makes it easier to perform operations like aggregations, filtering, or creating visualizations.

Here’s a simple example to illustrate the concept:

Wide-format dataset

Wide-format dataset

Unpivoted (long-format) dataset:

Unpivoted (long-format) dataset:

For more technologies supported by our ETL Software see Advanced ETL Processor Versions

Confused? Ask question on our ETL Forum

Posted on January 27, 2025 • 2 min read • 234 words
www.etl-tools.com About Support Pricing Cookies Policy Term Of Use Privacy Policy License