永洪社区

标题: 时间组件过滤绑定字段时报错ql_illegal_argument_exception [打印本页]

作者: yhdata_eFUZ276y    时间: 2022-6-24 11:16
标题: 时间组件过滤绑定字段时报错ql_illegal_argument_exception
本帖最后由 yhdata_eFUZ276y 于 2022-6-24 11:18 编辑

组件绑定数据apply_time :

数据集:

错误信息:
执行数据失败:java.lang.Exception:    Related Dashboard: '预览: xxx报表20220624092xxx-216'   Related Query: 'ecf_department_handling_fee'   Related Element: '贷款申请日期'   Run user: 'm*****a'
Caused by: java.lang.RuntimeException   Received invalid response! Http Status Code: 400, {"error":{"root_cause":[{"type":"ql_illegal_argument_exception","reason":"cannot cast [2019-6-27T00:00:00] to [datetime]: Text '2019-6-27T00:00:00' could not be parsed at index 5"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"ecf_department_handling_fee","node":"PAh9PZnDRqaar3_zicqtig","reason":{"type":"script_exception","reason":"runtime error","script_stack":["org.elasticsearch.xpack.ql.type.DataTypeConverter$DefaultConverter.lambda$fromString$21(DataTypeConverter.java:481)","org.elasticsearch.xpack.ql.type.DataTypeConverter$DefaultConverter.convert(DataTypeConverter.java:503)","org.elasticsearch.xpack.sql.type.SqlDataTypeConverter.convert(SqlDataTypeConverter.java:344)","org.elasticsearch.xpack.sql.expression.function.scalar.whitelist.InternalSqlScriptUtils.cast(InternalSqlScriptUtils.java:513)","InternalSqlScriptUtils.cast(InternalSqlScriptUtils.concat(InternalSqlScriptUtils.concat(InternalSqlScriptUtils.concat(InternalSqlScriptUtils.cast(InternalSqlScriptUtils.dateTimeExtract(InternalQlScriptUtils.docValue(doc,params.v0), params.v1, params.v2),params.v3),params.v4),InternalSqlScriptUtils.concat(InternalSqlScriptUtils.cast(InternalSqlScriptUtils.dateTimeExtract(InternalQlScriptUtils.docValue(doc,params.v5), params.v6, params.v7),params.v8),params.v9)),InternalSqlScriptUtils.concat(InternalSqlScriptUtils.cast(InternalSqlScriptUtils.dateTimeExtract(InternalQlScriptUtils.docValue(doc,params.v10), params.v11, params.v12),params.v13),params.v14)),params.v15)","                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^----     HERE"],"script":"InternalSqlScriptUtils.cast(InternalSqlScriptUtils.concat(InternalSqlScriptUtils.concat(InternalSqlScriptUtils.concat(InternalSqlScriptUtils.cast(InternalSqlScriptUtils.dateTimeExtract(InternalQlScriptUtils.docValue(doc,params.v0), params.v1, params.v2),pa ...","lang":"painless","position":{"offset":665,"start":0,"end":670},"caused_by":{"type":"ql_illegal_argument_exception","reason":"cannot cast [2019-6-27T00:00:00] to [datetime]: Text '2019-6-27T00:00:00' could not be parsed at index 5","caused_by":{"type":"date_time_parse_exception","reason":"Text '2019-6-27T00:00:00' could not be parsed at index 5"}}}}],"caused_by":{"type":"ql_illegal_argument_exception","reason":"cannot cast [2019-6-27T00:00:00] to [datetime]: Text '2019-6-27T00:00:00' could not be parsed at index 5","caused_by":{"type":"date_time_parse_exception","reason":"Text '2019-6-27T00:00:00' could not be parsed at index 5"}}},"status":400}



作者: yhdata_eFUZ276y    时间: 2022-6-24 11:19
我在数据集里的格式明明是 2019-06-27 为什么报错信息是2019-6??
作者: Fiona    时间: 2022-6-24 11:35
把报告导出我看一下
我们连不上您的数据库,放心不会有数据安全问题
作者: yhdata_eFUZ276y    时间: 2022-6-24 12:02
Fiona 发表于 2022-6-24 11:35
把报告导出我看一下
我们连不上您的数据库,放心不会有数据安全问题

已经解决了,我们数据源是ES7 把时间格式化为字符串再转为时间列。过滤条件使用这个时间列就正常了 - -
作者: yhdata_yzm    时间: 2022-6-24 12:15
yhdata_eFUZ276y 发表于 2022-6-24 12:02
已经解决了,我们数据源是ES7 把时间格式化为字符串再转为时间列。过滤条件使用这个时间列就正常了 - - ...






欢迎光临 永洪社区 (http://club.yonghongtech.com/) Powered by Discuz! X3.4