Hisoka-X commented on code in PR #5367:
URL: https://github.com/apache/seatunnel/pull/5367#discussion_r1356558683


##########
seatunnel-connectors-v2/connector-amazonsqs/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazonsqs/source/AmazonSqsSourceFactory.java:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.amazonsqs.source;
+
+import org.apache.seatunnel.api.configuration.util.OptionRule;
+import org.apache.seatunnel.api.source.SeaTunnelSource;
+import org.apache.seatunnel.api.table.catalog.CatalogTableUtil;
+import org.apache.seatunnel.api.table.factory.Factory;
+import org.apache.seatunnel.api.table.factory.TableSourceFactory;
+
+import com.google.auto.service.AutoService;
+
+import static 
org.apache.seatunnel.connectors.seatunnel.amazonsqs.config.AmazonSqsConfig.REGION;
+import static 
org.apache.seatunnel.connectors.seatunnel.amazonsqs.config.AmazonSqsConfig.URL;
+
+@AutoService(Factory.class)
+public class AmazonSqsSourceFactory implements TableSourceFactory {
+    @Override
+    public String factoryIdentifier() {
+        return "AmazonSqs";
+    }
+
+    @Override
+    public OptionRule optionRule() {
+        return OptionRule.builder().required(URL, REGION, 
CatalogTableUtil.SCHEMA).build();

Review Comment:
   Please rebase from dev, I believe this field already move to 
`TableSchemaOptions`



##########
seatunnel-connectors-v2/connector-amazonsqs/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazonsqs/config/AmazonSqsConfig.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.amazonsqs.config;
+
+import org.apache.seatunnel.api.configuration.Option;
+import org.apache.seatunnel.api.configuration.Options;
+
+import java.io.Serializable;
+
+public class AmazonSqsConfig implements Serializable {
+
+    public static final String DEFAULT_FIELD_DELIMITER = ",";
+
+    public static final Option<String> URL =
+            Options.key("url")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDescription("url to read to Amazon SQS Service");
+    public static final Option<String> REGION =
+            Options.key("region")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDescription("The region of Amazon SQS Service");
+    public static final Option<String> ACCESS_KEY_ID =
+            Options.key("access_key_id")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDescription("The access id of Amazon SQS Service");
+    public static final Option<String> SECRET_ACCESS_KEY =
+            Options.key("secret_access_key")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDescription("The access secret key of Amazon SQS 
Service");
+
+    public static final Option<String> MESSAGE_GROUP_ID =
+            Options.key("message_group_id")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDescription("The message group id of Amazon SQS 
Service");
+    public static final Option<String> SCHEMA =

Review Comment:
   Please reuse `TableSchemaOptions.SCHEMA`, do not create new `schema` option.



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