Gabriell-h opened a new issue, #4748: URL: https://github.com/apache/incubator-seatunnel/issues/4748
### 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 JDBC source端里的query 中 sql语句不能识别函数比如我在greenplum里能select count(*) from da_metrics.td_metrics tm where w_upd_dt between now()-interval '1 year' and now()查找 但是在source中这样配置会报错 不能识别Now()函数 ### SeaTunnel Version 2.3.1 ### SeaTunnel Config ```conf env { # You can set flink configuration here execution.parallelism = 1 job.mode = "BATCH" } source { # This is a example source plugin **only for test and demonstrate the feature source plugin** Jdbc { url = "jdbc:postgresql://10.200.194.105:5234/CRLAND_DP" driver = "org.postgresql.Driver" user = "ur_uapp_crland_dp" password = "" query = "select * from da_metrics.td_metrics where w_upd_dt between now()-interval '1 year' and now() " } } transform { } sink { StarRocks { nodeUrls = ["10.207.0.168:8030","10.207.0.174:8030","10.207.0.172:8030"] base-url = "jdbc:mysql://10.207.0.168:9030" username = "root" password = "" database = "odc" table = "td_metrics" batch_interval_ms = 10000 max_retries = 10 } } ``` ### Running Command ```shell bin/flink run -t yarn-per-job -Dyarn.application.queue=flink -d -c org.apache.seatunnel.core.starter.flink.SeaTunnelFlink /app/seatunnel/starter/seatunnel-flink-13-starter-2.3.1.jar --config /app/seatunnel/config/gp2sr_sale_plan.conf --name SeaTunnel ``` ### Error Exception ```log Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "now" Position: 52 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:134) at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.JdbcInputFormat.open(JdbcInputFormat.java:181) ... 6 more ``` ### Flink or Spark Version _No response_ ### Java or Scala Version _No response_ ### Screenshots _No response_ ### Are you willing to submit PR? - [ ] 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]
