Member since
04-04-2017
1
Post
0
Kudos Received
0
Solutions
03-20-2018
02:15 PM
@Yong Boon Lim The problem is with your create table statement for test_9. Just have a look at your syntax. CREATE TABLE default.test_9 (col INT)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\u001C'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'; Now when you will describe this table, you will see something like | # Storage Information | NULL | NULL |
| SerDe Library: | org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe | NULL |
| InputFormat: | org.apache.hadoop.hive.ql.io.orc.OrcInputFormat | NULL |
| OutputFormat: | org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat | NULL | That's so not right!!! Your SerDe library is LazySimpleSerde and your Input Format and Output Format are ORC. Totally not gonna work! Now let's say you tweak your CREATE TABLE STATEMENT to look something like CREATE TABLE default.test_9 (col INT)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\u001C'
STORED AS ORC; A describe formatted table statement will show the storage information as | # Storage Information | NULL | NULL |
| SerDe Library: | org.apache.hadoop.hive.ql.io.orc.OrcSerde | NULL |
| InputFormat: | org.apache.hadoop.hive.ql.io.orc.OrcInputFormat | NULL |
| OutputFormat: | org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat | NULL | And now if you try to write data into test_9 from anywhere, you would be able to. Hope that helps!
... View more