{"action":"created","issue":{"url":"https://api.github.com/repos/confluentinc/ksql/issues/2257","repository_url":"https://api.github.com/repos/confluentinc/ksql","labels_url":"https://api.github.com/repos/confluentinc/ksql/issues/2257/labels{/name}","comments_url":"https://api.github.com/repos/confluentinc/ksql/issues/2257/comments","events_url":"https://api.github.com/repos/confluentinc/ksql/issues/2257/events","html_url":"https://github.com/confluentinc/ksql/issues/2257","id":389710009,"node_id":"MDU6SXNzdWUzODk3MTAwMDk=","number":2257,"title":"ROWKEY does not change by using 'key' property","user":{"login":"TobiasHauck","id":6579735,"node_id":"MDQ6VXNlcjY1Nzk3MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/6579735?v=4","gravatar_id":"","url":"https://api.github.com/users/TobiasHauck","html_url":"https://github.com/TobiasHauck","followers_url":"https://api.github.com/users/TobiasHauck/followers","following_url":"https://api.github.com/users/TobiasHauck/following{/other_user}","gists_url":"https://api.github.com/users/TobiasHauck/gists{/gist_id}","starred_url":"https://api.github.com/users/TobiasHauck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobiasHauck/subscriptions","organizations_url":"https://api.github.com/users/TobiasHauck/orgs","repos_url":"https://api.github.com/users/TobiasHauck/repos","events_url":"https://api.github.com/users/TobiasHauck/events{/privacy}","received_events_url":"https://api.github.com/users/TobiasHauck/received_events","type":"User","site_admin":false},"labels":[{"id":866292357,"node_id":"MDU6TGFiZWw4NjYyOTIzNTc=","url":"https://api.github.com/repos/confluentinc/ksql/labels/user-experience","name":"user-experience","color":"6231c4","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-11T11:06:48Z","updated_at":"2018-12-20T18:18:16Z","closed_at":"2018-12-20T18:18:16Z","author_association":"NONE","body":"Imagine I've got a topic ```foo``` containing avro data:\r\n```\r\n{ id: \"634576745\", someString: \"test123\", customerId: \"111\" },\r\n...\r\n```\r\n\r\nwhere ```id``` has exactly the same value than the kafka message key. So the kafka messages look like:\r\n```{ \"634576745\": { id: \"634576745\", someString: \"test123\", customerId: \"111\" } }```\r\n\r\nNow I want to build a table and use the customerId as the key. So I'm following the documentation and use the \"key\" property:\r\n\r\n```CREATE TABLE FOO WITH (kafka_topic='foo', value_format='avro', key='customerId');```\r\n\r\nWhat I expect is the ROWKEY to become the customerId, but what I get is (After a ```SELECT * FROM FOO;```):\r\n```[ 37443657647, \"634576745\", \"634576745\", \"test123\", \"111\" ]```, so the ROWKEY has not changed at all.\r\n\r\nAm I doing something wrong or is this a bug?"},"comment":{"url":"https://api.github.com/repos/confluentinc/ksql/issues/comments/449089403","html_url":"https://github.com/confluentinc/ksql/issues/2257#issuecomment-449089403","issue_url":"https://api.github.com/repos/confluentinc/ksql/issues/2257","id":449089403,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTA4OTQwMw==","user":{"login":"rmoff","id":3671582,"node_id":"MDQ6VXNlcjM2NzE1ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/3671582?v=4","gravatar_id":"","url":"https://api.github.com/users/rmoff","html_url":"https://github.com/rmoff","followers_url":"https://api.github.com/users/rmoff/followers","following_url":"https://api.github.com/users/rmoff/following{/other_user}","gists_url":"https://api.github.com/users/rmoff/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoff/subscriptions","organizations_url":"https://api.github.com/users/rmoff/orgs","repos_url":"https://api.github.com/users/rmoff/repos","events_url":"https://api.github.com/users/rmoff/events{/privacy}","received_events_url":"https://api.github.com/users/rmoff/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T18:18:16Z","updated_at":"2018-12-20T18:18:16Z","author_association":"CONTRIBUTOR","body":"HI @TobiasHauck, this is currently expected behaviour. `WITH (KEY='foo')` is simply _advising_ KSQL that column `foo` in the payload matches the key of the Kafka message. \r\n\r\nIf you want to change the key of a message _you_ need to repartition it, which KSQL does support with the `PARTITION BY` syntax. See this for details: https://www.confluent.io/stream-processing-cookbook/ksql-recipes/setting-kafka-message-key"}}
{"actor":{"display_login":"rmoff"}}