-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Explicit keys #5533
Merged
big-andy-coates
merged 7 commits into
confluentinc:master
from
big-andy-coates:explicit_keys
Jun 3, 2020
Merged
Explicit keys #5533
big-andy-coates
merged 7 commits into
confluentinc:master
from
big-andy-coates:explicit_keys
Jun 3, 2020
Commits on Jun 3, 2020
-
implements: [KLIP-29](confluentinc#5530) fixes: confluentinc#5303 fixes: confluentinc#4678 This change sees ksqlDB no longer adding an implicit `ROWKEY STRING` key column to created streams or primary key column to created tables when no key column is explicitly provided in the `CREATE` statement. BREAKING CHANGE `CREATE TABLE` statements will now fail if not `PRIMARY KEY` column is provided. For example, a statement such as: ```sql CREATE TABLE FOO (name STRING) WITH (kafka_topic='foo', value_format='json'); ``` Will need to be updated to include the definition of the PRIMARY KEY, e.g. ```sql CREATE TABLE FOO (ID STRING PRIMARY KEY, name STRING) WITH (kafka_topic='foo', value_format='json'); ``` If using schema inference, i.e. loading the value columns of the topic from the Schema Registry, the primary key can be provided as a partial schema, e.g. ```sql -- FOO will have value columns loaded from the Schema Registry CREATE TABLE FOO (ID INT PRIMARY KEY) WITH (kafka_topic='foo', value_format='avro'); ``` `CREATE STREAM` statements that do not define a `KEY` column will no longer have an implicit `ROWKEY` key column. For example: ```sql CREATE STREAM BAR (NAME STRING) WITH (...); ``` The above statement would previously have resulted in a stream with two columns: `ROWKEY STRING KEY` and `NAME STRING`. With this change the above statement will result in a stream with only the `NAME STRING` column. Streams will no KEY column will be serialized to Kafka topics with a `null` key.
Configuration menu - View commit details
-
Copy full SHA for 2dd637e - Browse repository at this point
Copy the full SHA 2dd637eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 97b86a3 - Browse repository at this point
Copy the full SHA 97b86a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e952d91 - Browse repository at this point
Copy the full SHA e952d91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ddfdee - Browse repository at this point
Copy the full SHA 6ddfdeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f5ac03 - Browse repository at this point
Copy the full SHA 2f5ac03View commit details -
Configuration menu - View commit details
-
Copy full SHA for e281961 - Browse repository at this point
Copy the full SHA e281961View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48853b4 - Browse repository at this point
Copy the full SHA 48853b4View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.