0
votes

I uploaded a csv with the following data:

this is my data in CSV

following are the commands that I used to upload the data to hive

  1. Drag the file to linux file system.

  2. Use the following command to upload to hdfs. hadoop fs -put "/home/kdeep/kd_city_data.csv" /home/kdeep

  3. Use hive to load the data load data inpath '/home/kdeep' into table dev.k_site;

My table looks like this:
Table

1
Looks like a dodgy delimiter to me.Joe C

1 Answers

1
votes

How do create the table? you must specify the delimiter :

hive> CREATE TABLE dev.k_site(String Location,Year String,perc_food double,perc_g double) row format delimited fields terminated by ‘,’ ;