Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Orc Table Creation without column details

Solved Go to solution

Orc Table Creation without column details

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

Accepted Solutions

Re: Orc Table Creation without column details

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

2 REPLIES 2

Re: Orc Table Creation without column details

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

Re: Orc Table Creation without column details

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.

Don't have an account?
Coming from Hortonworks? Activate your account here