Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Orc Table Creation without column details

avatar
New Member

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
New Member

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
New Member

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.