Created on 11-28-2016 07:19 PM - edited 09-16-2022 03:49 AM
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 30019]: The file that you are trying to load does not match the file format of the destination table. Destination table is stored as ORC but the file being loaded is not a valid ORC file.
Created 11-28-2016 07:46 PM
How did you write the ORC file to this location (Pig, Spark, NiFi other?).
Can you show the schema of the table, the contents of the folder where ORC files are written, and also any details/code on how the file was ingested?
Created 11-28-2016 08:03 PM
Thanks,http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/
I am practicing from above link, but my hive.default.fileformat is ORC
Created 11-28-2016 08:00 PM
http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/
I am practicing from above link, but my hive.default.fileformat is ORC
Created 12-07-2016 03:38 PM
Issues:
1) In your table definition "create table ..." you do not specify the LOCATION attribute of your table. Therefore Hive will default to look for the file in the default warehouse dir path. The location in your screenshot is under /user/admin/. You can run the command "show create table ..." to see where Hive thinks the table's files are located.
By default Hive creates managed tables, where files, metadata and statistics are managed by internal Hive processes. A managed table is stored under the hive.metastore.warehouse.dir path property, by default in a folder path similar to /apps/hive/warehouse/databasename.db/tablename/. The default location can be overridden by the location property during table creation.
2) You are specifying the format using hive.default.fileformat. I would avoid using this property. Instead simply use "STORED AS TEXTFILE" or "STORED AS ORC" in your table definition.
Please change the above, retest and let us know how that works