kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax" <matth...@confluent.io>
Subject Re: Can I query ktable/stream/store with SQL like statment.
Date Wed, 13 Feb 2019 00:16:57 GMT
You could do a range query from "abc" to "abd" for example (in this
case, you would need to make sure to check the result form the iterator
and drop "abd" though).

Note, that range queries are executed on the raw bytes. Thus, you need
to understand how the serializes you use work. In doubt, you may want to
use conservative ranges and apply a filter on the iterator to ignore
false positives.

Also, this only work for prefix queries, ie, if you query with a know
prefix of the key.

Hope this helps.

-Matthias

On 2/12/19 8:25 AM, Nan Xu wrote:
> Hi,
> 
>     Just wondering if there is a way to do a sql like "select key,
> value.fieild1 from ktable where key like abc%"
>     The purpose of this to select some value from a ktable without a fully
> defined key.  Store.all then filter on them would be very inefficient if
> store is big.
> 
> Thanks,
> Nan
> 


Mime
View raw message