I have a table in Hive db with array type column which I want to copy it with content to Vertica db. The Version of Vertica db is v9.0.1-0 and I cant create table with array type. To copy table I tried to use
COPY vertica_schema.destination FROM hive_table_path ON ANY NODE ORC;
but got an empty table. Could you help me copy table and covert Hive array int type to Vertica varchar type? For example Vertica varchar values can be look as: [1, 1, 1]
or {1, 1, 1}
.
Vertica destination table init:
CREATE TABLE vertica_schema.destination (
col_a INTEGER NOT NULL,
col_array VARCHAR(200), -- ARRAY[INTEGER] not working
) ORDER BY id
UNSEGMENTED ALL NODES;
Hive source table init:
create table source
(
col_a int,
col_array array<int>
) stored as orc;
insert into source select 1, array(1, 2, 3);
insert into source select 2, array(2, 2, 2);
insert into source select 3, array(3, 3, 3);