Reply
New Contributor
Posts: 1
Registered: ‎10-18-2017

Impala KUDU table - howto bulk update

Hello! I need to performing updates of KUDU table, Is there any option to du update in bulk?

 

The flow is following:
1 .Fetch 1000 rows
2. Process rows, calculate new value for each row
3. Update KUDU table with new values

 

Updating row by row with one DB query per row - slow. I am seeking bulk update solution. I found only this "You can update in bulk using the same approaches outlined in Inserting In Bulk." here https://www.cloudera.com/documentation/kudu/latest/topics/kudu_impala.html#update_bulk but how to du this? I need example, if it is possible

Thanks

Cloudera Employee
Posts: 64
Registered: ‎09-28-2015

Re: Impala KUDU table - howto bulk update

Are you looking to use the direct API or would you be OK with a SQL
solution?

Certainly the easiest would be to simply use a SQL query from Impala such
as:

update t set my_col='foo' where bar > 123;

If you want to use the API, I'd suggest using the AUTO_FLUSH_BACKGROUND
mode to ensure that many updates get batched together into a single
round-trip RPC to the tablet servers.

Todd
Announcements