How does one create a table in Presto with one of the columns having an Array datatype?
For example:
CREATE TABLE IF NOT EXISTS (ID BIGINT, ARRAY_COL ARRAY)...
How does one create a table in Presto with one of the columns having an Array datatype?
For example:
CREATE TABLE IF NOT EXISTS (ID BIGINT, ARRAY_COL ARRAY)...
Edit
The syntax for array type is array(element_type)
, like this:
create table memory.default.t (a array(varchar));
Original answer
The syntax for array type is array<element_type>
, like this:
create table memory.default.t (a array<varchar>);
Note: the connector in which you create the table must support the array data type and not every connector supports it.