Create struct column

Supported in: Batch, Streaming

Combines multiple columns into a single structured column.

Expression categories: Struct

Declared arguments

  • Struct elements - List of columns used to create struct.
    List<Expression<AnyType>>

Output type: Struct

Examples

Example 1: Base case

Argument values:

  • Struct elements: [tail_number, id]
tail_numberidOutput
MT-1121{
id: 1,
tail_number: MT-112,
}
XB-1232{
id: 2,
tail_number: XB-123,
}
PA-6543{
id: 3,
tail_number: PA-654,
}

Example 2: Base case

Argument values:

  • Struct elements: [tail_number, id]
tail_numberidOutput
null1{
id: 1,
tail_number: null,
}
XB-123null{
id: null,
tail_number: XB-123,
}
nullnull{
id: null,
tail_number: null,
}