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:
can you give an example of your dataset?
On Tue, Aug 19, 2014 at 2:31 PM, Sushant Prusty <sushan...@gmx.com
<mailto:sushan...@gmx.com>> wrote:
Pl let me know how I can load a CSV file with embedded map and
arrays data into Hive.
Regards,
Sushant
--
Nitin Pawar
--
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;