misi1987107 commented on code in PR #8765:
URL: https://github.com/apache/seatunnel/pull/8765#discussion_r1988464767


##########
seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/source/SftpFileSourceFactory.java:
##########
@@ -45,39 +45,38 @@ public String factoryIdentifier() {
     @Override
     public OptionRule optionRule() {
         return OptionRule.builder()
-                .optional(SftpConfigOptions.FILE_PATH)
-                .optional(SftpConfigOptions.SFTP_HOST)
-                .optional(SftpConfigOptions.SFTP_PORT)
-                .optional(SftpConfigOptions.SFTP_USER)
-                .optional(SftpConfigOptions.SFTP_PASSWORD)
-                .optional(BaseSourceConfigOptions.FILE_FORMAT_TYPE)
+                .exclusive(SftpFileSourceOptions.TABLE_CONFIGS, 
SftpFileSourceOptions.FILE_PATH)
+                .optional(SftpFileSourceOptions.SFTP_HOST)
+                .optional(SftpFileSourceOptions.SFTP_PORT)

Review Comment:
   If the host,port are set to required.The test case will not pass.
   
#https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/json/sftp_file_json_to_assert_with_multipletable.conf



##########
seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/source/SftpFileSourceFactory.java:
##########
@@ -45,39 +45,38 @@ public String factoryIdentifier() {
     @Override
     public OptionRule optionRule() {
         return OptionRule.builder()
-                .optional(SftpConfigOptions.FILE_PATH)
-                .optional(SftpConfigOptions.SFTP_HOST)
-                .optional(SftpConfigOptions.SFTP_PORT)
-                .optional(SftpConfigOptions.SFTP_USER)
-                .optional(SftpConfigOptions.SFTP_PASSWORD)
-                .optional(BaseSourceConfigOptions.FILE_FORMAT_TYPE)
+                .exclusive(SftpFileSourceOptions.TABLE_CONFIGS, 
SftpFileSourceOptions.FILE_PATH)
+                .optional(SftpFileSourceOptions.SFTP_HOST)
+                .optional(SftpFileSourceOptions.SFTP_PORT)

Review Comment:
   If the host,port are set to required.The test case will not pass.
   
https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/json/sftp_file_json_to_assert_with_multipletable.conf



-- 
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: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to