Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] 无法正常生成SQL,问的问题全部都无法回复 #1393

Open
jingyingce opened this issue Jul 11, 2024 · 4 comments
Open
Labels
question Further information is requested

Comments

@jingyingce
Copy link

Describe your question

image
我看了一下SQL内容,其中的字段不是我的表里所设置的字段,不知道是不是示例数据有影响?或者是其他原因

Provide any additional context or information

No response

What have you tried to resolve your question

No response

Your environment

No response

Screenshots or Logs

No response

Additional information

No response

@jingyingce jingyingce added the question Further information is requested label Jul 11, 2024
@jingyingce
Copy link
Author

日志报错信息如下,我看有SQL,但是字段名称不是我的表里的

2024-07-11 08:52:29,747 [http-nio-9080-exec-9] INFO [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.corrector.GroupByCorrector 56 - not add group by ,exist group by in correctS2SQL:SELECT MONTH(数据日期), SUM(收入) FROM 收入 WHERE 数据日期 >= '2024-01-01' AND 数据日期 <= '2024-07-31' GROUP BY MONTH(数据日期) ORDER BY 数据日期
2024-07-11 08:52:29,793 [http-nio-9080-exec-9] INFO [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.t.DefaultSemanticTranslator 78 - parse dataSetQuery [DataSetQueryParam(sql=SELECT MONTH(sys_imp_date), SUM(income) FROM t_3 WHERE sys_imp_date >= '2024-01-01' AND sys_imp_date <= '2024-07-31' GROUP BY MONTH(sys_imp_date) ORDER BY sys_imp_date, tables=[MetricTable(alias=t_3, metrics=[income], dimensions=[sys_imp_date], where=null, aggOption=OUTER)], supportWith=true, withAlias=true)]
2024-07-11 08:52:29,794 [http-nio-9080-exec-9] INFO [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.t.DefaultSemanticTranslator 125 - parse metricQuery [MetricQueryParam(metrics=[income], dimensions=[sys_imp_date], where=null, limit=null, order=null, nativeQuery=true)] isAgg [OUTER]
2024-07-11 08:52:29,795 [http-nio-9080-exec-9] INFO [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.t.c.s.node.DataSourceNode 204 - dataSourceMeasures [{income=0}]
2024-07-11 08:52:29,795 [http-nio-9080-exec-9] INFO [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.t.c.s.node.DataSourceNode 268 - baseDataSource measures not match all measure
2024-07-11 08:52:29,796 [http-nio-9080-exec-9] INFO [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.t.c.s.node.DataSourceNode 274 - baseDataSource not match all measure
2024-07-11 08:52:29,797 [http-nio-9080-exec-9] ERROR [supersonic_ac6b4e708d4140e18fda9aa9e08fbf4e] c.t.s.h.c.t.DefaultSemanticTranslator 130 - parser error metricQueryReq[MetricQueryParam(metrics=[income], dimensions=[sys_imp_date], where=null, limit=0, order=null, nativeQuery=true)] error [{}]
java.lang.Exception: not find the match datasource : dimension[[]],measure[[income_income]]

@jingyingce
Copy link
Author

实际我的表结构是这样的
image

@jdzhang1221
Copy link
Contributor

time设置成时间类型字段试试呢

@jerryjzhang
Copy link
Collaborator

截图是规则的解析,建议有大模型服务的情况下,不要配置规则工具

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants