Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROWKEY=null, while should be a value #5539

Closed
Vasiliy-Bondarenko opened this issue Jun 3, 2020 · 2 comments
Closed

ROWKEY=null, while should be a value #5539

Vasiliy-Bondarenko opened this issue Jun 3, 2020 · 2 comments
Labels

Comments

@Vasiliy-Bondarenko
Copy link

Describe the bug
I'm creating a stream with

CREATE STREAM S_USERS32
(id VARCHAR,
   name VARCHAR,
   country VARCHAR)
WITH (KAFKA_TOPIC='users3',VALUE_FORMAT='JSON', KEY='id');

it gets created. but when i query it with

select * from S_USERS32 EMIT CHANGES;

i get ROWKEY=null while actual id field is correct.
screenshot: http://joxi.ru/L21lbV3TgQwdNm

To Reproduce
Steps to reproduce the behavior, include:

  1. ksql-server: docker image confluentinc/cp-ksql-server:5.4.0
  2. Sample source data
    {
    "id": "1",
    'name': "Bob" ,
    "country": "Thailand"
    }

Expected behavior
ROWKEY to be the same as id

@PeterLindner
Copy link

WITH(KEY='id') does not set the key, it's just an optimization hint for ksqldb that the key of the topic is the same as the given field in the value so that ksqldb does not need to repartition the topic...
As far as I know this was removed recently, see #3537

@big-andy-coates
Copy link
Contributor

Yes, it was removed recently.

Getting KEY='id' will not change the data in the topic. So if the data in the topic has a null key, then so will the data returned by your select statement.

This functionality has now been removed, (as it was causing confusion!), so closing the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants