transpose2

Partitions table on the time and prefix column.

The transpose2 operator is a partition column that acts on multiple columns from the parent table. It is different from the transpose operator that has the time and prefix column.

Operator Usage in Easy Mode

  1. Click + on the parent node.
  2. Enter the Transpose operator in the search field and select the operator from the Results to open the operator form.
  3. In the Table drop-down, enter or select the table containing the data to run this operator on.
  4. In the Group by Rows Columns drop-down, enter or select single or multiple column names to perform group by before transpose.
  5. In the New Header Column drop-down, select a field name whose values will be the new column header.
  6. In the Value Column field, select a column name whose values will be new values of cells.
  7. Optional. In the New Column Prefix drop-down, prefix string to newHeaderColumn name in the output column. Click Add More to add additional columns with prefixes.
  8. Click Run to view the result.
  9. Click Save to add the operator to the playbook.
  10. Click Cancel to discard the operator form.

Usage Details

transpose(table:InputTable, groupbyrowscolumns:String,  newheadercolumn:String, valuecolumn:String)

Parameters
table: input table that contains the information to create JSON object.
groupbyrowscolumns: column names to perform group by before transpose.
newheadercolumn: field name whose values will be new column names.
valuecolumn: column name whose values will be new values of cells.

Example

In the input table, enter the partition attributes.

The input table displays the following partitioned table.

coltimeval
one11
one221
two12

When you apply the transpose2 operator, the output is shown as follows:

transpose2(InputTable, ["time"], "col", "val", "new_col_prefix_")

The output table displays the following partitioned table.

timenew_col_prefix_onenew_col_prefix_two
112
221null

© Devo Technology Inc. All Rights Reserved.