How to solve the issue of querying Kafka Streaming Data? Writing KSQL Query

The second part of our article on querying Kafka Streaming Data.

Writing KSQL Query

Listing 4 SQL fr erfrming stk nlysis

SQL fr erfrming stk nlysis.png

ne yu run this query, yull results similr t wht dislyed here in figure 5:

KSQL Query.png

Yull need t run ./grdlew runrduerIntertiveQueries t rvide dt fr the KSQL exmles.

The lumn n the left is the tiker symbl, nd the number is the number f shres trded fr tht symbl ver the lst ten sends. With this query, yuve seified tumbling windw f ten sends, but KSQL surts sessin nd hing windws s well. Nw yuve built streming litin withut writing ny de t ll; quite n hievement. Fr mrisn lets tke lk t the rresnding litin written in the Kfk Strems I:

Listing 5. Stk nlysis litin written in Kfk Strems.
Stk nlysis litin written in Kfk Strems.png
Even thugh the Kfk Strems I is nise, the equivlent yu wrte in KSQLs ne ne-liner query.

Original post can be found here.

Interested in upgrading your skills? Check out our trainings.

Siddharth Garg
Software Development Engineer

Share the knowledge

Still have questions?
Connect with us
Thank you.
Your request has been received.
Thank you!
The form has been submitted successfully.