How to load an ORC file created externally into HIVE Table stored as ORC?
Below code is working for me, while loading ORC files present in HDFS into a hive table.
Create a table in hive.
create table MyDB.TEST ( Col1 String, Col2 String, Col3 String, Col4 String) STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat';
Load data to the table.
LOAD DATA INPATH '/hdfs/dir/folder/to/orc/files/' INTO TABLE MyDB.TEST;