legendtkl opened a new issue, #1814: URL: https://github.com/apache/incubator-seatunnel/issues/1814
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### What happened Now I unified the parse logic of Flink Jar and SQL job in previous PRs, but Flink SQL job conf does not follow the `typesafe.Config` conversion. It will throw exception when parse sql conf. ### SeaTunnel Version 2.1.1 ### SeaTunnel Config ```conf -- -- 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. -- -- -- This config file is a demonstration of sql processing in SeaTunnel config -- -- SET 'table.dml-sync' = 'true'; CREATE TABLE events ( f_type INT, f_uid INT, ts AS localtimestamp, WATERMARK FOR ts AS ts ) WITH ( 'connector' = 'datagen', 'rows-per-second'='5', 'fields.f_type.min'='1', 'fields.f_type.max'='5', 'fields.f_uid.min'='1', 'fields.f_uid.max'='1000' ); CREATE TABLE print_table ( type INT, uid INT, lstmt TIMESTAMP ) WITH ( 'connector' = 'print', 'sink.parallelism' = '1' ); INSERT INTO print_table SELECT * FROM events where f_type = 1; ``` ### Running Command ```shell $ ./start-seatunnel-sql.sh --config ../config/flink.sql.conf.template Exception in thread "main" org.apache.seatunnel.shade.com.typesafe.config.ConfigException$Parse: ../config/flink.sql.conf.template: 2: Key '--' may not be followed by token: '--' (if you intended '--' to be part of a key or string value, try enclosing the key or value in double quotes) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseError(ConfigDocumentParser.java:201) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseError(ConfigDocumentParser.java:197) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseObject(ConfigDocumentParser.java:461) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parse(ConfigDocumentParser.java:648) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser.parse(ConfigDocumentParser.java:14) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.rawParseValue(Parseable.java:260) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.rawParseValue(Parseable.java:248) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.parseValue(Parseable.java:180) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.parseValue(Parseable.java:174) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.parse(Parseable.java:299) at org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory.parseFile(ConfigFactory.java:689) at org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory.parseFile(ConfigFactory.java:703) at org.apache.seatunnel.core.base.config.ConfigParser.getConfigEnvValues(ConfigParser.java:36) at org.apache.seatunnel.core.flink.utils.CommandLineUtils.buildFlinkCommand(CommandLineUtils.java:89) at org.apache.seatunnel.core.sql.FlinkSqlStarter.buildCommands(FlinkSqlStarter.java:48) at org.apache.seatunnel.core.sql.FlinkSqlStarter.main(FlinkSqlStarter.java:54) ``` ### Error Exception ```log $ ./start-seatunnel-sql.sh --config ../config/flink.sql.conf.template Exception in thread "main" org.apache.seatunnel.shade.com.typesafe.config.ConfigException$Parse: ../config/flink.sql.conf.template: 2: Key '--' may not be followed by token: '--' (if you intended '--' to be part of a key or string value, try enclosing the key or value in double quotes) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseError(ConfigDocumentParser.java:201) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseError(ConfigDocumentParser.java:197) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseObject(ConfigDocumentParser.java:461) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parse(ConfigDocumentParser.java:648) at org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigDocumentParser.parse(ConfigDocumentParser.java:14) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.rawParseValue(Parseable.java:260) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.rawParseValue(Parseable.java:248) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.parseValue(Parseable.java:180) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.parseValue(Parseable.java:174) at org.apache.seatunnel.shade.com.typesafe.config.impl.Parseable.parse(Parseable.java:299) at org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory.parseFile(ConfigFactory.java:689) at org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory.parseFile(ConfigFactory.java:703) at org.apache.seatunnel.core.base.config.ConfigParser.getConfigEnvValues(ConfigParser.java:36) at org.apache.seatunnel.core.flink.utils.CommandLineUtils.buildFlinkCommand(CommandLineUtils.java:89) at org.apache.seatunnel.core.sql.FlinkSqlStarter.buildCommands(FlinkSqlStarter.java:48) at org.apache.seatunnel.core.sql.FlinkSqlStarter.main(FlinkSqlStarter.java:54) ``` ### Flink or Spark Version _No response_ ### Java or Scala Version _No response_ ### Screenshots _No response_ ### 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]
