liunaijie commented on code in PR #8858:
URL: https://github.com/apache/seatunnel/pull/8858#discussion_r1974683912


##########
seatunnel-connectors-v2/connector-amazondynamodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondynamodb/sink/AmazonDynamoDBSinkFactory.java:
##########
@@ -43,8 +43,8 @@ public String factoryIdentifier() {
     @Override
     public OptionRule optionRule() {
         return OptionRule.builder()
-                .required(URL, REGION, ACCESS_KEY_ID, SECRET_ACCESS_KEY, TABLE)
-                .optional(BATCH_SIZE)
+                .required(REGION, ACCESS_KEY_ID, SECRET_ACCESS_KEY, TABLE)
+                .optional(BATCH_SIZE, URL)

Review Comment:
   Hi, base on your description.
   If `url` and `region` are exclusive. so you can use method `exclusive(URL, 
REGION)` to describe the relationship. So when they are both config, will get 
error.
   
   Also you update access_key_id, secret_access_key to no necessary, So you 
need move them into `option` from `required`



##########
docs/en/connector-v2/sink/AmazonDynamoDB.md:
##########
@@ -14,34 +14,38 @@ Write data to Amazon DynamoDB
 
 |       Name        |  Type  | Required | Default value |
 |-------------------|--------|----------|---------------|
-| url               | string | yes      | -             |
-| region            | string | yes      | -             |
-| access_key_id     | string | yes      | -             |
-| secret_access_key | string | yes      | -             |
+| url               | string | no       | -             |
+| region            | string | no       | -             |
+| access_key_id     | string | no       | -             |
+| secret_access_key | string | no       | -             |
 | table             | string | yes      | -             |
 | batch_size        | string | no       | 25            |
 | common-options    |        | no       | -             |
 
 ### url [string]
 
-The URL to write to Amazon DynamoDB.
+The URL to write to Amazon DynamoDB. It will override the `endpoint` of AWS 
DynamoDB. Note: the `url` and `region` parameters can only be set one. When 
setting the url, the `region` parameter will be ignored.

Review Comment:
   Hi, I'm not very familiar with DynamoDB. 
   So is there any official documentation for this feature? Does it have a 
minimum version requirement?



##########
seatunnel-connectors-v2/connector-amazondynamodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondynamodb/source/AmazonDynamoDBSourceFactory.java:
##########
@@ -50,8 +50,14 @@ public String factoryIdentifier() {
     @Override
     public OptionRule optionRule() {
         return OptionRule.builder()
-                .required(URL, REGION, ACCESS_KEY_ID, SECRET_ACCESS_KEY, 
TABLE, SCHEMA)
-                .optional(SCAN_ITEM_LIMIT, PARALLEL_SCAN_THREADS)
+                .required(TABLE, SCHEMA)

Review Comment:
   ditto



-- 
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