kudu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Henke <ghe...@cloudera.com>
Subject Re: Delete or Update by Query
Date Tue, 16 Jul 2019 21:40:26 GMT
Ultimately you need to use a scanner to get all the rows that match that
predicate and then delete them.

There is an example of doing this via Spark in the Spark quickstart guide
here:
https://github.com/apache/kudu/tree/master/examples/quickstart/spark#read-and-modify-data

On Tue, Jul 16, 2019 at 4:17 PM Adar Lieber-Dembo <adar@cloudera.com> wrote:

> Unfortunately there's no way to do that currently: if you want to
> delete a row, you must provide its complete primary key.
>
> On Tue, Jul 16, 2019 at 2:01 PM John Mora <jhnmora000@gmail.com> wrote:
> >
> > Hi.
> >
> > I am trying to delete multiple rows at the same time through a condition
> using kudu-client.
> >
> > Let's say:
> > DELETE FROM table WHERE key>=xx AND key<=yy
> >
> > However, I could not find its equivalent in kudu-client for java.
> >
> > I was analyzing delete operations like the one below, but it deletes
> only one row at the same time.
> >
> > Delete delete = table.newDelete();
> > ...
> > session.apply(delete);
> >
> > Is there some way to delete multiple rows using a condition?, maybe via
> a Scanner or similar.
> >
> > Thanks in advance for your help.
> >
> > Cheers,
> > John Mora
>


-- 
Grant Henke
Software Engineer | Cloudera
grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke

Mime
View raw message