redpanda-data / redpanda-data/console

Simple SQL query filter on topic browse

Open
#517 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
4.3k
Forks
432
Avg merge
3d 6h
Merged PRs (30d)
40

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the topic browse filter and its current JavaScript predicate support, including the partition and offset fields mentioned in the issue. Define the supported SQL syntax and record metadata before assessing how the SQL should map to predicates; the initial goal is filtering by fields such as partition, offset, key, headers, and value, with projections left for later.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sql, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.