Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Orc Table Creation without column details

avatar
New Contributor

I am trying to create an external orc table, i am not aware of columns list, I am trying to create a orc table with Serde and gave the orc file location.

I am a new beginner and trying to create a ORC table. Hear is the table below,

create external table orcsample1 row format serde 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' stored as inputformat 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' outputformat 'org.apache.hadoop.hive.ql.io.orc.OrcOutPutFormat' location'file:///test/Files/orcfiles/hvac.orc' TBLPROPERTIES("orc.compress"="SNAPPY");

1 ACCEPTED SOLUTION

avatar
Contributor

ORC doesn't support that at this time. You can use the ORC file dump utility to find the schema (hive --service orcfiledump _filename_) and then use that when you create the table.

View solution in original post

2 REPLIES 2

avatar
Contributor

ORC doesn't support that at this time. You can use the ORC file dump utility to find the schema (hive --service orcfiledump _filename_) and then use that when you create the table.

avatar
Cloudera Employee

Actually, it is Hive that doesn't support it. ORC files are self-describing, so if you read the file programmatically, the reader provides the schema. Unfortunately, Hive's serdes are asked for the schema without being given the file path.