[FLaNK]: Running Apache Flink SQL Against Kafka Using a Schema Registry Catalog
There are a few things you can do when you are sending data from Apache NiFi to Apache Kafka to maximize it's availability to Flink SQL queries through the catalogs.
Producing Kafka Messages
Make sure you set AvroRecordSetWriter and set a Message Key Field.
A great way to work with Flink SQL is to connect to the Cloudera Schema Registry. It let's you define your schema once them use it in Apache NiFi, Apache Kafka Connect, Apache Spark, Java Microservices
Make sure you setup your HDFS directory for use by Flink which keeps history and other important information in HDFS.
HADOOP_USER_NAME=hdfs hdfs dfs -mkdir /user/root
HADOOP_USER_NAME=hdfs hdfs dfs -chown root:root /user/root
flink-sql-client embedded -e sql-env.yaml
We now have access to Kudu and Schema Registry catalogs of tables. This let's use start querying, joining and filtering any of these multiple tables without having to recreate or redefine them.
SELECT * FROM events