dzikosc commented on code in PR #152:
URL: 
https://github.com/apache/flink-connector-aws/pull/152#discussion_r1757390907


##########
docs/content/docs/connectors/table/dynamodb.md:
##########
@@ -303,6 +303,46 @@ WITH (
 );
 ```
 
+## Specifying Primary Key For Deletes
+
+The DynamoDB sink supports Delete requests to DynamoDB, but AWS requires that 
a Dynamo Delete request contain **only** the key field(s), or else the Delete 
request will fail with `DynamoDbException: The provided key element does not 
match the schema`.
+Thus, if a Changelog stream being is being written to DynamoDB that contains 
DELETEs, you must specify the `PRIMARY KEY` on the table.
+This `PRIMARY KEY` specified for the Flink SQL Table must match the actual 
Primary Key of the DynamoDB table - so it must be either just the Partition 
Key, or in case of a composite primary key, it must be the Partition Key and 
Sort Key.
+
+Example For Partition Key as only Primary Key:
+```sql
+CREATE TABLE DynamoDbTable (
+  `user_id` BIGINT,
+  `item_id` BIGINT,
+  `category_id` BIGINT,
+  `behavior` STRING,
+  PRIMARY KEY (user_id) NOT ENFORCED

Review Comment:
   Why do we use NOT ENFORCED qualifier? In case of DynamoDB Primary Key 
property (or properties) are always present on the record. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to