Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Load CSV files with embedded map and arrays to Hive


Copy link to this message
-
Re: Load CSV files with embedded map and arrays to Hive
Hi Nitin,
Thanks for your prompt reply. I am enclosing the datafile and the table
creation script.

Looking forward to your support.

On Tuesday 19 August 2014 02:33 PM, Nitin Pawar wrote:

Warm regards,

Sushant Prusty
 John Doe,100000.0,Mary Smith,Todd Jones,Federal Taxes,.2,State Taxes,.05,Insurance,.1,1 Michigan Ave.,Chicago,IL,60600
Mary Smith,80000.0,Bill King,Federal Taxes,.2,State Taxes,.05,Insurance,.1,100 Ontario St.,Chicago,IL,60601
Todd Jones,70000.0,Federal Taxes,.15,State Taxes,.03,Insurance,.1,200 Chicago Ave.,Oak Park,IL,60700
Bill King,60000.0,Federal Taxes,.15,State Taxes,.03,Insurance,.1,300 Obscure Dr.,Obscuria,KL,60100
Boss Man,200000.0,John Doe,Fred Finance,Federal Taxes,.3,State Taxes,.07,Insurance,.05,1 Pretentious Drive.,Chicago,AB,60500
Fred Finance,150000.0,Stacy Accountant,Federal Taxes,.3,State Taxes,.07,Insurance,.05,2 Pretentious Drive.,Chicago,DC,60500
Stacy Accountant,60000.0,Federal Taxes,.15,State Taxes,.03,Insurance,.1,300 Main St.,Naperville,IL,60563
 CREATE TABLE if not exists employees (
name STRING,
salary FLOAT,
subordinates ARRAY<STRING>,
deductions MAP<STRING, FLOAT>,
address STRUCT<street:STRING, city:STRING, state:STRING, zip:INT>
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\001'
COLLECTION ITEMS TERMINATED BY '\002'
MAP KEYS TERMINATED BY '\003'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB