Looking for the previous version? View v2024.06 documentation →
Query Chain using Unpivot Transformation
Overview
The Unpivot transformation is the reverse of Pivot — it converts multiple columns into rows, normalising wide data into a long format. This guide covers configuring the Unpivot widget to select the columns to collapse into rows.
Prerequisites
- You are logged in to Data Trust with a Pro-User or Admin Pro-User role.
- A Query Chain with a wide-format data source widget has been configured.
Steps
Path: Data Trust › Query Studio › Query Chain using Unpivot Transformation
Navigate to the Query Studio module and select Query Chain Option to open the Query Builder workspace. This is the starting point for creating, editing, and managing queries in Data Trust.
Drag the Rdbms Widget widget from the palette and drop it onto the Query Chain canvas. Once placed, click the widget to open its configuration popup and complete the required settings.
This step shows RDBMS widget popup in the Query Chain using Unpivot Transformation workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
This step shows Order_detals table in the Query Chain using Unpivot Transformation workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
The Navigator panel displays the available databases, schemas, and tables for the selected connection. Expand the tree to locate the required table, then click Select to add it to the query.
Click Save to persist the query or configuration to the Query Explorer. A confirmation message appears once the save completes, and the query is available for reuse in Query Chains and scenarios.
Drag the Unpivot Widget widget from the palette and drop it onto the Query Chain canvas. Once placed, click the widget to open its configuration popup and complete the required settings.
The Select UnPivot Clolumns transformation reshapes the data by converting rows to columns (Pivot) or columns to rows (Unpivot). Specify the key column, value column, and the fields to pivot or unpivot, then save the widget.
The Unpivot For and UnPivot By transformation reshapes the data by converting rows to columns (Pivot) or columns to rows (Unpivot). Specify the key column, value column, and the fields to pivot or unpivot, then save the widget.
Navigate to the Query Studio module and select RD Output Option to open the Query Builder workspace. This is the starting point for creating, editing, and managing queries in Data Trust.
Drag the Rd Output widget from the palette and drop it onto the Query Chain canvas. Once placed, click the widget to open its configuration popup and complete the required settings.
The RD Output widget captures the final result set from the Query Chain for use in downstream processes. Configure the output name and format, then save the widget to make the results accessible to other scenarios and reports.
Click Execute Now to run the query immediately and fetch the result set. The results appear in the Results tab, and the execution status is displayed in the progress indicator.
This step shows Execution Compleated in the Query Chain using Unpivot Transformation workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
This step shows Result in the Query Chain using Unpivot Transformation workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.