Reading Structs

Columns in the Parquet format can contain structs, which store (typed) property-value pairs. For example, an address column could use a struct with strings for the street address, city/state, and postal code, such as { "street":"150 Cambridgepark Dr.", "city":"Cambridge MA", "postalcode":"02140"}. (This is a Hive display format, not literally what is stored in the data file.)

When loading Parquet data, you represent the struct as a single column. You can query the column (the struct as a whole) or individual fields within the struct.

To read structs from ORC data, see Reading Structs as Expanded Columns.

In This Section