Click to copy

• Reviewed for ksqlDB 0.29

How to Solve Table isn't Queryable in ksqlDB

The `TABLE_NAME` table isn't queryable. To derive a queryable table, you can do 'CREATE TABLE QUERYABLE_SCORES_TABLE AS SELECT * FROM SCORES_TABLE'. See https://cnfl.io/queries for more info.
Add EMIT CHANGES if you intended to issue a push query.
Statement: select * from scores_table where score = 4.5;

The error message above means that your table is not materialized. In ksqlDB, you can’t query the current state of non-materialized tables via pull queries.

You create non-materialized tables when creating a table from existing topics or when creating an empty table.

Querying a non-materialized table

Either use push queries instead or materialize the table first to run pull queries on it.

Note that push queries need to recreate the state from the underlying topic every time they run. Pull queries can leverage the materialization and are much more performant because they can query the current state directly.
Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like