confluentinc / confluentinc/kafka-tutorials
No output : (ksqlDB Tutorial) How to find distinct values in a stream of events
- Dominant language
- Java
- Stars
- 39
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
For the tutorial below
https://kafka-tutorials.confluent.io/finding-distinct-events/ksql.html
A table is created as below
```
CREATE TABLE DETECTED_CLICKS AS
SELECT
IP_ADDRESS AS KEY1,
URL AS KEY2,
TIMESTAMP AS KEY3,
AS_VALUE(IP_ADDRESS) AS IP_ADDRESS,
AS_VALUE(URL) AS URL,
AS_VALUE(TIMESTAMP) AS TIMESTAMP
FROM CLICKS WINDOW TUMBLING (SIZE 2 MINUTES, RETENTION 1000 DAYS)
GROUP BY IP_ADDRESS, URL, TIMESTAMP
HAVING COUNT(IP_ADDRESS) = 1;
```
Then a stream is declaring with the explanation saying - "statement declares a stream on top of the DETECTED_CLICKS changelog topic, defining only the value columns we’re interested in"
```
CREATE STREAM RAW_DISTINCT_CLICKS (IP_ADDRESS STRING, URL STRING, TIMESTAMP STRING)
WITH (KAFKA_TOPIC = 'DETECTED_CLICKS',
PARTITIONS = 1,
FORMAT = 'JSON');
```
But in reality, a new topic by name "DETECTED_CLICKS" is created that has no idea about "DETECTED_CLICKS" changelog, and as a result, this topic contains no messages.
For the same reason, the subsequent STREAM "DISTINCT_CLICKS" based on the above stream does not display any output as expected.
Contributor guide
Assessment
This issue has not been assessed yet.