Created 07-16-2021 11:47 AM
Hello,
I am trying to load bmp image data to hive and getting below error. I went through many past discussions but didn't find an exact solution to implement.
Appreciate your help in solving this.
Steps I followed.
1: Copied the images to HDFS
2: Created a table with a column Binary
3: Load using data in path.
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.
My scripts:
create table wrk_image
(id int
, filename STRING
, data BINARY
);
load data inpath '/warehouse/tablespace/external/hive/cadt.db/scriptpro/' into table wrk_image;
Created 07-18-2021 08:22 AM
Please provide the below information:
1. What is the version? HDP/CDP/CDH ?
2. provide "scriptpro"
3. What si the error recieved ?
Created 07-19-2021 09:21 AM
Hi Asis,
Here is the info.
CDH version : CDH-7.1.5
Scripture : its just a directory I created under db.
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.
Please let me know if you need more information.
Thanks,
Sai
Created 07-19-2021 10:26 AM
Hi Sai,
Please follow https://community.cloudera.com/t5/Support-Questions/Does-hive-support-Photo-or-images-datatypes/td-p...
Copy the data to hdfs instead of loadpath and check,
Thanks,
Asish