Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

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.

Populating Non-Partitioned Bucketed Tables

avatar

Hi Gurus,

It may not be practical question, however, I am wandering, if it is possible to load data in a Bucketed Table (Non-Partitioned) through insert-overwrite.

I am getting NullPointerException while I am trying to do so.

CREATE TABLE my_stg.mytable1 ( 
         employee_id int,
         employee_name string,
         dept STRING, 
         country STRING
          ) 
CLUSTERED BY (employee_id) INTO 256 BUCKETS
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';
set hive.enforce.bucketing = true;
INSERT OVERWRITE TABLE my_stg.mytable1 SELECT employee_id,employee_name,dept,country FROM my_stg.mytable;
FAILED: NullPointerException null

Thanks,

Soumya

1 ACCEPTED SOLUTION

avatar
Super Guru

possibly you are hitting https://issues.apache.org/jira/browse/HIVE-10776, could you please share the complete exception

View solution in original post

2 REPLIES 2

avatar
Super Guru

possibly you are hitting https://issues.apache.org/jira/browse/HIVE-10776, could you please share the complete exception

avatar
New Member

I too got the same exception while insert overwrite to a bucketed table by selecting data from a partitioned table.

I applied a work around to get around this problem.

1. First insert the data to a non partitioned temp table

2.select the data from the temp table and insert it to the bucketed table

This solved the problem for me.