VI Unrotate Process Object
The Visual Integrator (VI) Unrotate process object flattens multiple rows of input data to a single row with multiple columns in the output flow.
The Unrotate object creates new horizontal columns and assigns the value columns based on a dimension value.
The Unrotate process object has three panes where you set attributes.
You set attributes for the Unrotate process object in the object attributes pane.
Attribute | Description |
---|---|
Input |
Defines the object from which the data flow arrives. Use one of the following methods to attach the Unrotate object to an input data flow object:
|
Warn_Limit |
This optional attribute controls how many data integrity warnings are displayed in the log. By default, this attribute is not set. If a limit is set and reached, the log displays the following message: Further data integrity warnings suppressed for Unrotate object "<object_name>". Increase the warn_limit attribute to see more. |
New_Columns_List |
Defines a separate input flow that specifies the horizontal values and horizontal columns to rotate. This is an alternative method to supply these attributes instead of using the column grid. This input flow must have the following columns:
To attach an input object for the New_Columns_List_Input:
The New_Columns_List_Input and entering the values in column grid are mutually exclusive. This input flow can be generated with another Input or Calc object. DI recommends that you generate this input flow with a separate task. |
Each object has an area where you can enter comments.
It is a DI best practice to enter a note for every object in a VI script. You can set a VI preference to give a warning for each object without a note.
The Unrotate column grid is where you set dimensions that define which input column is used for the horizontal column. Define the new horizontal column and set the horizontal values. You also define value columns that contain the new horizontal columns that the Unrotate object outputs.
Attribute | Description |
---|---|
Column Grid Buttons | Use the Add Column button to add additional value columns. At least one value column is required. Click twice in the field, and choose a column from the list. With the Delete Row and Delete Column buttons, you can edit the rows and columns that display in the top portion of the column grid. |
Input Column | Displays the name of each input column. This attribute is read-only. |
Source Object |
Displays the name and object type of the source object. Double-click the Source Object for a column to change the task flow focus to that object. |
Hor. Column | Defines the input column that contains the set of values that determine the set of output columns that should receive the value columns of the current row. This is a required attribute. |
Dimension | Defines the input columns that are used to detect identical rows in the input to unrotate into a single output row. If the dimension values match between two adjacent rows, the values are stored in the same output row (unless values for the same set of horizontal columns are given). If none are selected, all non-value columns are used to detect identical rows. |
Unrotating Data
With the following input data:
-
Set the Unrotate object's Hor. Column, and select one or more input columns as Dimensions in the column grid.
-
Enter values for the horiz_column. Press Enter after each entry and a new row is added.
-
Click Add Column to define a new values columns.
A new column is added to the table.
-
In the new column heading, select a column from the list of input columns.
-
Enter values to define the output columns to be generated.
-
Repeat steps 3-5 for each output value column that you wish to generate.
The example here has two values columns: Units and Dollars.
-
Save the tab.
-
Right-click the Unrotate object, and click Test Object.
In the results you see the unrotated data.