- All Implemented Interfaces:
- Directive, Executor<List<Row>,List<Row>>, Serializable
@Categories(categories="column")
public class FlattenRecord
extends Object
implements Directive
A directive for splitting a RowType ("Record") Column into multiple Columns.
The directive takes multiple columns of type "Row" as brings all its elements up a level.
Topmost elements will be set under new columns prefixed with the name of the parent column
followed by an underscore. Existing columns with the same name will be replaced by the new values.
E.G
Input:
| A |
{B: 1, C: 2}
Directive
flatten-record :A
Output:
| A | A_B | A_C |
{B: 1, C:2} | 1 | 2 |
- See Also:
- Serialized Form