confluentinc/ksql

Name: ksql

Owner: Confluent Inc.

Description: KSQL - the Streaming SQL Engine for Apache Kafka

Created: 2016-09-27 21:30:15.0

Updated: 2018-05-24 08:11:49.0

Pushed: 2018-05-24 09:04:44.0

Homepage:

Size: 7413

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

KSQL rocket KSQL - Streaming SQL for Apache Kafka

KSQL is now GA and officially supported by Confluent Inc. Get started with KSQL today.

KSQL is the streaming SQL engine for Apache Kafka.

KSQL is an open source streaming SQL engine for Apache Kafka. It provides a simple and completely interactive SQL interface for stream processing on Kafka; no need to write code in a programming language such as Java or Python. KSQL is open-source (Apache 2.0 licensed), distributed, scalable, reliable, and real-time. It supports a wide range of powerful stream processing operations including aggregations, joins, windowing, sessionization, and much more.

Click here to watch a screencast of the KSQL demo on YouTube. KSQL screencast

Getting Started and Download

Stable Releases

Stable releases are published every four months and are officially supported by Confluent.

  1. Download latest stable KSQL, which is included in the Enterprise and Open Source editions of Confluent Platform.
  2. Follow the Quick Start.
  3. Read the KSQL Documentation, notably the KSQL Tutorials and Examples, which include Docker-based variants.

Preview Releases

In addition to supported stable KSQL releases, we also provide monthly preview releases. We encourage you to try them in development and testing environments and to take advantage of Confluent Community resources to get help and share feedback.

Documentation

See KSQL documentation for the latest stable release.

Use Cases and Examples

Streaming ETL

Apache Kafka is a popular choice for powering data pipelines. KSQL makes it simple to transform data within the pipeline, readying messages to cleanly land in another system.

TE STREAM vip_actions AS
LECT userid, page, action
OM clickstream c
FT JOIN users u ON c.userid = u.user_id
ERE u.level = 'Platinum';
Anomaly Detection

KSQL is a good fit for identifying patterns or anomalies on real-time data. By processing the stream as data arrives you can identify and properly surface out of the ordinary events with millisecond latency.

TE TABLE possible_fraud AS
LECT card_number, count(*)
OM authorization_attempts
NDOW TUMBLING (SIZE 5 SECONDS)
OUP BY card_number
VING count(*) > 3;
Monitoring

Kafka's ability to provide scalable ordered messages with stream processing make it a common solution for log data monitoring and alerting. KSQL lends a familiar syntax for tracking, understanding, and managing alerts.

TE TABLE error_counts AS
LECT error_code, count(*)
OM monitoring_stream
NDOW TUMBLING (SIZE 1 MINUTE)
ERE  type = 'ERROR'
OUP BY error_code;

Latest News

Join the Community

You can get help, learn how to contribute to KSQL, and find the latest news by connecting with the Confluent community.

Contributing

Contributions to the code, examples, documentation, etc. are very much appreciated.

License

The project is licensed under the Apache License, version 2.0.

Apache, Apache Kafka, Kafka, and associated open source project names are trademarks of the Apache Software Foundation.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.