简体   繁体   English

Ksql 找不到任何名为“COUNT_DISTINCT”的函数

[英]Ksql Can't find any functions with the name 'COUNT_DISTINCT'

I am running ksql cli using我正在使用 ksql cli 运行

docker run --net=host --interactive --tty confluentinc/cp-ksql-cli:latest http://localhost:8088

I have created a stream我创建了一个 stream

CREATE STREAM RAW (`nodeId` INT,`data` STRING) WITH (kafka_topic='raw-data', value_format='JSON',partitions=3);

When I run query for count_distinct当我运行 count_distinct 查询时

SELECT COUNT_DISTINCT(`nodeId`) FROM RAW EMIT CHANGES;

It says它说

Can't find any functions with the name 'COUNT_DISTINCT'

The documentation specifies this function文档指定了这个 function

https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/aggregate-functions/ https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/aggregate-functions/

As guided by @OneCricketeer solved by using latest docker images as described in https://ksqldb.io/quickstart.html按照@OneCricketeer 的指导,使用最新的 docker 图像解决,如https://ksqldb.io/quickstart.html中所述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM