Unloading Complex Types

In an UNLOAD TO file, values of complex data types appear as follows:
  • Collections are introduced with the appropriate constructor (MULTISET, LIST, SET), with their comma-separated elements enclosed in braces ( { } ):
    constructor{val1 , val2 , ... }

    For example, to unload the SET values {1, 3, 4} from a column of the SET (INTEGER NOT NULL) data type, the corresponding field of the UNLOAD TO file appears as follows:

    |SET{1 , 3 , 4}|
  • ROW types (named and unnamed) are introduced by the ROW constructor and have their fields enclosed between parentheses and comma-separated:
    ROW(val1 , val2 , ... )

    For example, to unload the ROW values (1, 'abc'), the corresponding field of the UNLOAD TO file appears as follows:

    |ROW(1 , abc)|