result_table option.
This table can be persisted (like normal tables) using the
result_table_persist option.
A memory-only table name must adhere to the standard
naming criteria. Each memory-only table
exists within a schema and follows the standard
name resolution rules for tables.
Examples
Customer
Given a source tablecustomer_contact, which lists the name, ID, and home,
work, & cell phone numbers for each customer in the table:
Student
Given a source tablestudent_grade, which lists each student’s quarterly
grades as separate columns in a single record:
Limitations
- The unpivot operation cannot be applied to vector or array
data types, meaning they cannot appear in the
pivoted_columnslist. - The column types for the
pivoted_columnsmust match, e.g.,int8toint8,char4tochar4, etc.
Unpivot Memory-Only Tables
- Creating a memory-only table results in an entirely new data set, so be mindful of the memory usage implications.
- If an unpivot memory-only table is created and its source data set’s rows are updated (or removed), the memory-only table will not be updated to reflect the changes in the source data set.
- An unpivot memory-only table is transient, by default, and will expire after the default TTL setting.
- An unpivot memory-only table is not persisted, by default, and will not
survive a database restart; specifying a
result_table_persistoption oftruewill make the table permanent and not expire.