Reading Maps

Columns in the Parquet format can contain complex data types, including maps.  A map has two fields, a key and a value. For external tables backed by files in the Parquet format only, Vertica supports defining but not querying map columns. Because you must define all columns in order to be able to read the file, defining maps even though you cannot query them allows you to read and query data that you would not otherwise be able to use.

To define a map column, use the MAP<type,type> syntax as in the following example:

=> CREATE EXTERNAL TABLE store (storeID INT, inventory MAP<INT,VARCHAR(100)>) 
    AS COPY FROM '...' PARQUET;

You can define maps of primitive types. Maps containing other complex types, such as a map of ints to structs, are not supported.

If a query makes use of a map column, the query produces an error. You can otherwise query the table as usual.