console icon indicating copy to clipboard operation
console copied to clipboard

Simple SQL query filter on topic browse

Open michaelpearce-gain opened this issue 3 years ago • 2 comments

Whilst javascript filters does allow you to do what is needed, for end users not conversant in javascript, especially less technical business operations etc. it would be good to provide an SQL query abililty which is more widely understood language to work with data (akin to lenses sql query) this could be a initially a simple overlay that just converts under the hood to javascript.

(note at present it seems only partition and offset available in javascript to query, it be good to expose all the record meta data to query on, e.g. timestamp etc)

e.g.

SELECT * FROM WHERE _meta.partition = 2 AND _meta.offset = 37580

could be coded into:

return partition == 2 && offset == 37580

or

SELECT * FROM WHERE value.fieldA = Bah AND value.fieldB = Foo

return value.fieldA == 2 && value.fieldB == 37580

using value to mean the record value, key to mean record key, headers etc. etc,

later improvement could be to return only what is selected, rather than just true/false predicate, e.g. the select can enable to return sub part of data to reduce data on screen, but that could always be a later addition

michaelpearce-gain avatar Nov 04 '22 01:11 michaelpearce-gain

We can merge this ask into #274

twmb avatar Oct 19 '23 15:10 twmb

Perhaps unique enough that we can keep the ideas separate.

twmb avatar Oct 19 '23 17:10 twmb