-
Run following command in KSQL prompt:
RUN SCRIPT 'confluentConsumer.ksql'; -
To view results of windowed unique user aggregation in KSQL type the following:
SELECT ROWKEY, UNIQUE_USERS FROM UNIQUE_USERS; To stop type:Ctrl-C: -
View analysis in the Control Console
-
Navigate to Development-KSQL-Query Editor
-
To view results of non windowed country counts type the following:
SELECT ROWTIME, COUNTRY, COUNTRYCOUNT FROM COUNTRY_AGG; -
Run the script below under the Producer Heading to begin the Kafka Stream
-
Once the stream has ended stop both queries and exit KSQL using the below command:
exit -
End Services by running the following script:
sudo ~/Documents/Oetker/./confluentStop
- install dependencies
- install confluent
- add to path
- start confluent services
- create topic
- start ksql client
- Creates Producer to injest and parse JSON file and add timed delayed messages to stream
- Uses Confluent Python Library
- USER: Stream Created from Kafka Topic
- USER_INFO: Stream Created from USER Topic
- UNIQUE_USERS: Table Created from USER_INFO
- COUNTRY_AGG: Table Created from USER Topic
- Ends confluent services
- Easy integration with kafka streaming
- UI interface for monitoring stream performance and visualizing stream analytics
- KSQL integrates well with JSON kafka stream
- Packaged Kafka Zookeeper KSQL solution
- KSQL doesn't allow for aggregations of aggregated table data.
- Not able to select MAX, MIN from COUNT(*) for country
- Limited functionality in syncing queries with data streams
- Still in development/beta phase