[英]name is null error while doing group by column_name in confluent kafka ksql
I get error in confluent-5.0.0.我在 confluent-5.0.0 中出错。
ksql>CREATE TABLE order_per_hour AS SELECT after->order_id,count(*) FROM transaction WINDOW SESSION(60 seconds) GROUP BY after->order_id;
name is null名称为空
error-name is null错误名称为空
after is the struct field in schema. after 是架构中的结构字段。 simple select query without group by is working fine.
没有 group by 的简单选择查询工作正常。
I've submitted a PR to add support for this to KSQL here https://github.com/confluentinc/ksql/pull/2076我已经提交了一个 PR 来添加对 KSQL 的支持https://github.com/confluentinc/ksql/pull/2076
Hope this helps,希望这可以帮助,
Andy安迪
Currently you can only use column names in the GROUP BY
clause.目前,您只能在
GROUP BY
子句中使用列名。 As a work around you can write your query as the following:作为解决方法,您可以将查询编写如下:
CREATE STREAM foo AS SELECT after->order_id as o_id FROM transaction;
CREATE TABLE order_per_hour AS SELECT o_id,count(*) FROM foo WINDOW SESSION(60 seconds) GROUP BY o_id;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.