hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Kerzner <mark.kerz...@shmsoft.com>
Subject Best way to import complex data into Hive?
Date Wed, 05 Oct 2011 22:34:02 GMT
Hi,

I have some transactional data, which has a few map elements, but one more
complex - array of maps. Something like this

CREATE EXTERNAL TABLE mytable
(
log_timestamp string,
price map <string,string>,
opt array <map<string, string>>
)
ROW FORMAT   DELIMITED
FIELDS TERMINATED BY '\001'
COLLECTION ITEMS TERMINATED BY '\004'
MAP KEYS TERMINATED BY '\002'
STORED AS TextFile;

However, the data is a bit more complex, and I also use '\003' and '\005\'
for delimiters, only I have no place to tell Hive about it.

So it seems that I can define data structures like opt array <map<string,
string>>, but I don't know how to import such data.

What would be the advice?

Thank you. Sincerely,
Mark

Mime
View raw message