1、参数错误
报错信息
[INFO] 2024-04-11 06:43:18.386 - [taskAppId=TASK-29-3301-84461]:[498] - after replace sql , preparing : insertoverwrite table mis_month partition (dt)
select nvl(sl.slid , '') as id,--水量 IDnvl(sl.hh , '') as customer,--户号nvl(date_format(sl.sfyf, 'yyyy-MM') , '') as `month`,--水费月份nvl(date_format(sl.sfyf, 'yyyy-MM-dd') , '') as cbdate,--本期抄表日nvl(sl.sqxz , '') as previous,--上期行至nvl(sl.bqxz , '') as `current`,--本期行至nvl(sl.scsl , '') as used,--实抄水量nvl(date_format(sl.sfyf, 'yyyy-MM') , '') as dt -- '月份'
from ods_yqmis_cb_slb_df sl
LEFT JOIN (select hh, yyqy from ods_yqmis_da_yhbk_df where dt = ?) bk on bk.hh = sl.hh
where sl.dt = ?and sl.jgbz in ('1')and bk.yyqy = '9'and substring(sl.sfyf, 0, 7) >= ?
[INFO] 2024-04-11 06:43:18.386 - [taskAppId=TASK-29-3301-84461]:[503] - Sql Params are replaced sql , parameters:2024-04-11(VARCHAR)2024-04-11(VARCHAR)2024-03(VARCHAR)
[INFO] 2024-04-11 06:43:18.387 - [taskAppId=TASK-29-3301-84461]:[498] - after replace sql , preparing :
[INFO] 2024-04-11 06:43:18.387 - [taskAppId=TASK-29-3301-84461]:[503] - Sql Params are replaced sql , parameters:
[INFO] 2024-04-11 06:43:18.387 - [taskAppId=TASK-29-3301-84461]:[52] - can't find udf function resource
[INFO] 2024-04-11 06:43:18.450 - [taskAppId=TASK-29-3301-84461]:[414] - prepare statement replace sql : org.apache.hive.jdbc.HivePreparedStatement@68eeda69
[INFO] 2024-04-11 06:44:06.549 - [taskAppId=TASK-29-3301-84461]:[414] - prepare statement replace sql : org.apache.hive.jdbc.HivePreparedStatement@11bbd42c
[ERROR] 2024-04-11 06:44:06.593 - [taskAppId=TASK-29-3301-84461]:[243] - execute sql error
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near '<EOF>' '<EOF>' '<EOF>'at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:264)at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:250)at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:309)at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:250)at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:448)at org.apache.hive.jdbc.HivePreparedStatement.executeUpdate(HivePreparedStatement.java:119)at org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.postSql(SqlTask.java:307)at org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:240)at org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:139)at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:133)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near '<EOF>' '<EOF>' '<EOF>'at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:329)at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:207)at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:290)at org.apache.hive.service.cli.operation.Operation.run(Operation.java:260)at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:505)at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:491)at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)at java.security.AccessController.doPrivileged(Native Method)at javax.security.auth.Subject.doAs(Subject.java:422)at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875)at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)at com.sun.proxy.$Proxy35.executeStatementAsync(Unknown Source)at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:507)at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)... 3 common frames omitted
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 1:0 cannot recognize input near '<EOF>' '<EOF>' '<EOF>'at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:221)at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:75)at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:68)at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:564)at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1425)at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1398)at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:205)... 26 common frames omitted
[ERROR] 2024-04-11 06:44:06.631 - [taskAppId=TASK-29-3301-84461]:[145] - sql task error
java.lang.RuntimeException: execute sql errorat org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:244)at org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:139)at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:133)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
原因后置sql为空,没有的话应该直接删除