kudu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Mora <jhnmora...@gmail.com>
Subject Re: Delete or Update by Query
Date Thu, 18 Jul 2019 16:27:16 GMT
Hi Adar Lieber-Dembo and Grant Henke,

Thanks for your responses.
I think I will implement your suggestion, using a scanner for selecting the
primary keys and applying a block of multiple individual deletions from the
result.

Thanks,
John Mora


El mar., 16 jul. 2019 a las 16:41, Grant Henke (<ghenke@cloudera.com>)
escribió:

> 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