Support Questions

Find answers, ask questions, and share your expertise

Error inserting data into Kudu table

Explorer

I get the following error when trying to insert data into a kudu table

 

Error while compiling statement: FAILED: RuntimeException java.lang.ClassNotFoundException: org.apache.kudu.mapreduce.KuduTableOutputFormat

 

insert into db.my_kudu_table select ..... from db.another_table 

 

 

5 REPLIES 5

Contributor

Hi Rams,

 

By looking at the error messages, it seems the KuduTableOutputFormat class is not loaded in the classpath. Can you provide more information on how you are inserting the data? Are you using Kudu-Mapreduce util tool? If so, you can follow ImportCsv.java as an example to load data from other data store.

Explorer

Hi Hao,

I am using HUE via browser. Also tried hive and beeline commandline utilities. Same error in all 3 instances. 

Contributor

Hi Rams,

 

Kudu doesn't support Hive integration yet so I would use Impala shell instead. 

 

Explorer

Hi Hao

THe query does not compile in Impala Shell. Impala is unable to parse LATERAL VIEW EXPLODE

Contributor

Hi Rams,

 

If you have to use 'LATERAL VIEW EXPLODE' then maybe other person who is more familiar with Impala can chime in, to see if there is anything equivalent or similar. Otherwise, query such as 'INSERT INTO my_kudu_table SELECT * FROM legacy_data_import_table' should work (check https://kudu.apache.org/docs/kudu_impala_integration.html#kudu_impala_insert_bulk).