Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable to import data into hbase table through Importtsv.

avatar
Explorer

Hi, I am using Apache Hbase (Version 1.1.3).

Sample data used:

simple structure that I have got for an industrial sensor

 id, temp:in,temp:out,vibration,pressure:in,pressure:out
 5842,50,30,4,240,340

executed the Loadtsv statement as following

hbase> hbase org.apache.hadoop.hbase.mapreduce.ImportTsv-Dimporttsv.separator=,-Dimporttsv.columns="HBASE_ROW_KEY,id,temp:in,temp:out,vibration,pressure:in,pressure:out" sensor /user/hbase.csv

import the same data (header removed) - got this error - syntax error, unexpected ','

then removed the 'ID' column in '-Dimporttsv.columns'

hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator= ',' -Dimporttsv.columns="HBASE_ROW_KEY,temp:in,temp:out,vibration,pressure:in,pressure:out" sensor /user/hbase.csv

getting

syntax error, unexpected tIDENTIFIER

Please help

Thanks, Sridharan

12 REPLIES 12

avatar
Master Collaborator

hbase.csv should be placed on hdfs.

avatar
Master Collaborator

When I tried 'hbase' command within shell (HDP 2.5), I got:

hbase(main):001:0> hbase org.apache.hadoop.hbase.mapreduce.ImportTsv NoMethodError: undefined method `hbase' for #<Object:0x415d88de>

avatar
Rising Star

Hi @Sridharan Govindaraj. Did running your command from Unix shell instead of HBase shell solve this issue? You might also want to fully qualify your hdfs file path:

$ hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator="," -Dimporttsv.columns="HBASE_ROW_KEY,id,temp:in,temp:out,vibration,pressure:in,pressure:out" sensor hdfs:///user/hbase.csv