全部产品
存储与CDN 数据库 安全 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网 钉钉智能硬件
日志服务

日志查询分析常见报错

更新时间:2017-11-14 10:17:09

本文档主要介绍日志服务常见的查询分析报错,基本语法请查看分析语法

常见报错列表

  1. line 1:44: Column ‘mykeyfield’ cannot be resolved;please add the column in the index attribute
  2. Column ‘xxxx__line‘ not in GROUP BY clause;please add the column in the index attribute
  3. sql query must follow search query,please read syntex doc
  4. key word(where) is not supported,please read query syntex # | select apiName,count() as count where apiName=”” group by apiName order by count desc limit 10
  5. please read syntex document,and make sure all related fields are indexed. error after select .error detail:line 1:10: identifiers must not start with a digit; surround the identifier with double quotes
  6. please read syntex document,and make sure all related fields are indexed. error after select .error detail:line 1:9: extraneous input ‘’ expecting

1. line 1:44: Column ‘my_key_field’ cannot be resolved;please add the column in the index attribute

报错原因my_key_field这个Key不存在,所以您在query中无法引用该Key。

解决方案:在查询页面,右上角查询分析属性里,添加该字段为键值索引,同时打开统计功能。

2. Column ‘xxxxline‘ not in GROUP BY clause;please add the column in the index attribute

报错原因:您在查询中使用了GROUP BY语法,但是在Select中引用了一个非agg字段,该字段没有出现在GROUP BY中。例如select key1, avg(latency) group by key2 ,key1没有出现在GROUP BY中。

解决方案:正确语法是select key1,avg(latency) group by key1,key2

3. sql query must follow search query,please read syntex doc

报错原因:没有指定filter条件,例如select ip,count(*) group by ip

解决方案:正确的写法为*|select ip,count(*) group by ip

4. key word(where) is not supported,please read query syntex # | select apiName,count() as count where apiName=”” group by apiName order by count desc limit 10

报错原因:Where条件出现在了SQL语法中,不符合规范。

解决方案:将Where放在filter条件中,正确语法为apiName:"" | select apiName,count(*) as count group by apiName order by count desc limit 10

5. please read syntex document,and make sure all related fields are indexed. error after select .error detail:line 1:10: identifiers must not start with a digit; surround the identifier with double quotes

报错原因:SQL中引用到的列名、变量名等以数字开头,不符合规范。

解决方案:建议更改该名称,以字母开头。

6. please read syntex document,and make sure all related fields are indexed. error after select .error detail:line 1:9: extraneous input ‘’ expecting

报错原因:有单词拼写错误。

解决方案:请根据报错中指出的错误位置,修改至正确。

本文导读目录