chovy-3012 opened a new issue, #12815:
URL: https://github.com/apache/seatunnel/issues/12815

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   ### What happened
   
   When using `--check` or `--dry-run` to validate a file source config that 
contains certain options (e.g. `csv_use_header_line`, `binary_chunk_size`, 
`read_partitions`, etc.), the validation fails with "unknown option keys" 
error. However, running the same config without `--check` works perfectly fine 
— the options are correctly consumed at runtime.
   
   ### SeaTunnel Version
   
   3.0.1-SNAPSHOT
   
   ### SeaTunnel Config
   
   ```hocon
   env {
     parallelism = 1
     job.mode = "BATCH"
   }
   
   source {
     LocalFile {
       plugin_output = "fake"
       path = "/tmp/test"
       file_format_type = "csv"
       csv_use_header_line = true
       schema = {
         fields {
           name = "string"
           age = "int"
         }
       }
     }
   }
   
   sink {
     Console {
       plugin_input = "fake"
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   sh bin/seatunnel.sh --check -c config/test_csv.conf
   ```
   
   ### Error Exception
   
   ```
   Exception in thread "main" 
org.apache.seatunnel.core.starter.exception.ConfigCheckException:
     Static analysis failed: ErrorCode:[API-02], ErrorDescription:[Option item 
validate failed]
     - Connector 'LocalFile' has unknown option keys: [csv_use_header_line].
     Please check for typos.
        at 
org.apache.seatunnel.core.starter.seatunnel.command.SeaTunnelConfValidateCommand.execute(SeaTunnelConfValidateCommand.java:196)
        at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
        at 
org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:41)
   Caused by: 
org.apache.seatunnel.api.configuration.util.OptionValidationException:
     ErrorCode:[API-02], ErrorDescription:[Option item validate failed]
     - Connector 'LocalFile' has unknown option keys: [csv_use_header_line].
     Please check for typos.
        at 
org.apache.seatunnel.api.configuration.util.ConfigValidator.validateUnknownKeys(ConfigValidator.java:102)
        at 
org.apache.seatunnel.core.starter.seatunnel.command.SeaTunnelConfValidateCommand.validatePluginConfigs(SeaTunnelConfValidateCommand.java:325)
        at 
org.apache.seatunnel.core.starter.seatunnel.command.SeaTunnelConfValidateCommand.execute(SeaTunnelConfValidateCommand.java:162)
        ... 2 more
   ```
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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