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 reading Parquet data in external tables, you represent the struct as a single column. You can use the ROW type to define a struct column if the struct fields are primitive types, other structs, or arrays.

You can query the column (the struct as a whole) or individual fields within the struct.

In This Section