kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nan Xu <nanxu1...@gmail.com>
Subject Re: Can I query ktable/stream/store with SQL like statment.
Date Wed, 13 Feb 2019 14:59:37 GMT
Range query would be enough for me, is there an example? which api I can
call for this?

Thanks,
Nan

On Tue, Feb 12, 2019 at 6:17 PM Matthias J. Sax <matthias@confluent.io>
wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message