I have a small file in file system to be put on to hdfs; and I want to create a hive table (external) that takes its content, here is what I did:
[paslechoix@gw03 ~]$ vim file_on_local.txt
hdfs dfs -put file_on_local.txt /apps/hive/warehouse/paslechoix.db/file_on_hive
create external table file_on_hive (id int, name string) location ‘/apps/hive/warehouse/paslechoix.db/file_on_hive’;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:hdfs://nn01.itversity.com:8020/apps/hive/warehouse/paslechoix.db/file_on_hive is not a directory or unable to create one)
Where on HDFS should I put the file file_on_local.txt to ?