Created on 12-26-2018 11:15 AM - edited 09-16-2022 07:00 AM
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
Created 12-26-2018 03:24 PM
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.
Created 12-27-2018 03:22 AM
I am using HUE via browser. Also tried hive and beeline commandline utilities. Same error in all 3 instances.
Created 12-27-2018 11:06 AM
Kudu doesn't support Hive integration yet so I would use Impala shell instead.
Created 12-27-2018 11:10 AM
THe query does not compile in Impala Shell. Impala is unable to parse LATERAL VIEW EXPLODE
Created 12-27-2018 11:37 AM
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).