How to create Hive ORC table ?

1 comment
  • ORC stands for Optimized Row Columnar Format.
  • It is used to achieve higher compression rate and better query optimization.

Its very easy to create ORC table from existing NON-ORC table that has already Data in it.We will see how to practice this with step by step instructions.

Creating NON-ORC Table

First let us Non-ORC table as STUDENT, It is easy that we no need to specify that this table is ORC,
by default all the tables that we create are non-orc tables.

LOAD DATA from local file system to Non-orc Table

Using LOAD DATA INPATH hiveql, we can load the data into non orc table.

CREATING ORC TABLE using non-ORC table

Using SELECT hiveql we can create orc table from existing non-orc table as mentioned below.
create table studentORC
stored as orc
as select * from student;
Execution of above query would be something like below

The output of ORC Table Data on HDFS would look like something that is shown below.
ORC Data on HDFS


Practical Class Room Video

Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “How to create Hive ORC table ?”