I have a CSV file that is delimited by double quotes and a comma comma. It looks a bit like the following:
"Text from vendor ","Vendor Name, Inc."," blah blah ","Next string","", 1234
I am trying to import it into table in Hbase using Hive.
I am able to create a table from Hive in Hbase using something like the following:
hive> CREATE TABLE exampletable1(tax_numb int, tax_name string, tax_addr string, tax_city string, tax_stat string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:tax_name,cf:tax_addr,cf:tax_city,cf:tax_stat")
TBLPROPERTIES ("hbase.table.name" = "hiveexampletable1");
I was also able to add a table to Hive where I imported the CSV file (although with a problem with the double quotes) using a command like:
hive> create table example2(tax_numb int, tax_name string, tax_addr string, tax_city string, tax_stat string) row format delimited fields terminated by ',' stored as textfile;
I am however, unable to be able to integrate the "delimited fields" bit into the command where I create an external table in Hbase.
As I'm relatively new to the Hive-Hbase combination I went through a number of tutorials before arriving to a point where I deemed it better to ask the community for help. I ran a number of searches on google, to no avail.
Any help / suggestions would be much appreciated.