Define a struct type
Syntax:STRUCT< >
Struct types are declared using the angle brackets (< and >).
Examples
The statement below creates a tablex that contains struct a, which contains two nested columns (b and c) that are both integers.
y that contains struct a, which contains another struct c.
Add values to a struct
To add values to structs, enclose the nested data with() in the SQL statement. For example, (1, true). Alternatively, you can also use ROW(1, true).
Examples
The statement below adds values to tablex.
y.
trip.
Retrieve data in a struct
To retrieve data in a struct, enclose the struct name with() and use the dot operator to specify the nested column. For example, to access the initial_charge column under fare in the trip schema, use (fare).initial_charge.