transpose
Partitions table on the time bucket column.
The transpose operator partitions the table on the time bucket column and it takes the transpose of each partition. It transposes the table where the new fields will have unique values from newHeaderColumn field and values from the valueColumn field.
Operator Usage in Easy Mode
- Click + on the parent node.
- Enter the Transpose operator in the search field and select the operator from the Results to open the operator form.
- In the Table drop-down, enter or select the table containing the data to run this operator on.
- In the Timestamp Bucket Column drop-down, enter or select the time. The expressions will be displayed based on the table selected.
- In the New Header Column drop-down, select a field name whose values will be the new column header.
- In the Value Column field, select a column name whose values will be new values of cells.
- Click Run to view the result.
- Click Save to add the operator to the playbook.
- Click Cancel to discard the operator form.
Usage Details
transpose(table:InputTable, timeStampbucketColumn:String, newheadercolumn:String, valuecolumn:String)
Parameters
table
: input table that contains the information to create JSON object.
timestampbucketcolumn
: timestamp bucket field.
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.
col | time | val |
---|---|---|
one | 1 | 1 |
one | 2 | 21 |
two | 1 | 2 |
When you apply the transpose operator, the output is shown as follows:
transpose(InputTable, "time", "col", "val")
The output table displays the following partitioned table.
time | _col__two | _col__one |
---|---|---|
1 | 2 | 1 |
2 | null | 21 |
Updated about 1 year ago