Quantcast
Channel: Toad for Hadoop Forum - Recent Threads
Viewing all articles
Browse latest Browse all 114

Generate Create Table script for parquet tables

$
0
0

I used ToadFH 1.5.2 to generate a create table script, and the script it created contained:

STORED AS
INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'

Then I spent half a day wondering why I was getting this error when trying to do a simple insert into my new table:
java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to org.apache.hadoop.io.ArrayWritable

Turns out that I should have defined my table as
STORED AS PARQUET

After dropping and recreating my table with the simpler STORED AS PARQUET, my inserts worked correctly again. Can the script ToadFH creates be changed to do that for parquet tables instead?


Viewing all articles
Browse latest Browse all 114

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>