Search code examples
sqlapache-flink

Most efficient way in Flink to perform a sql lookup on a datastream


Given a datastream from Kafka, is there a built in way, or what is the most efficient way to perform a SQL lookup.

For example, having a stream object connected to a sql table and joining it with the Kafka datastream. Given a sql table that can be updated on an ad hoc basis,


Solution

  • It seems like the obvious answer is to use Flink's SQL API, which is documented here.

    There's also some Flink SQL training that includes a docker-based setup where you can use Flink's SQL client to make interactive SQL queries against a Kafka datastream.