I tried to create a table in hive using the following command:
CREATE TABLE apple (dates STRING, open INT, high INT, low INT, close INT, adj_close DECIMAL, vol INT) row format delimited fields terminated by ',' lines terminated by '\n' tblproperties ("skip.header.line.count"="1");**
Then I tried to load data using the command:
LOAD DATA INPATH '/user/root/stockdata/APPL.csv' OVERWRITE INTO TABLE apple;
The file APPL.csv is stored in HDFS
Executing the above resulted in the following error:
Error: Error while compiling statement: FAILED: SemanticException Unable to load data to destination table. Error: The file that you are trying to load does not match the file format of the destination table. (state=42000,code=40000)
Can someone help resolve this?