简体   繁体   中英

Turn non-Kudu to Kudu table in Impala

having problem with impala update statement , when I used code below

update john_estares_db.tempdbhue set QU=concat(account_id,"Q",quarter(mrs_change_date)," ",year(mrs_change_date));

it return error message:

AnalysisException: Impala does not support modifying a non-Kudu table: john_estares_db.tempdbhue

I would like to know if I can either change my non-Kudu table into a Kudu table or is there an alternate for update statement for non-Kudu in Impala. TIA

Apache Kudu is a data store (think of it as alternative to HDFS/S3 but stores only structured data) which allows updates based on primary key. This has good integration with Impala. A kudu table on Imapla is a way to query data stored on Kudu.

In short if you do not already have Kudu installed and setup already you cannot create a kudu table on Impala.

If you have it Kudu installed and setup, then you cannot simply convert a table kudu table. You have to create a new kudu table with similar structure with some primary-key columns (Kudu requires primary key for all tables) and insert data into this from old non-kudu table using sql query insert into .. select * from ... .

What is the type of table john_estares_db.tempdbhue ? Hive or other table type, update or upsert is not supported. You can use show create table to check your table type. show create table If you have kudu installed you can create a kudu table, and move your data into kudu table,then you can use your update code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM