Zeppelin is not printing a Flink DataStream

0

I'm running this code in a Zeppelin notebook (via Kinesis Analytics Studio), and it is not printing anything:

env.fromElements("a", "b", "c").print()
env.execute()
mattyf
已提問 2 年前檢視次數 434 次
1 個回答
0

If you are using %flink.pyflink or %flink as your interpreters, you will need to use the ZeppelinContext to visualize the results within the notebook.

%flink
// create a DataStream
val dataStream = senv.fromElements("Alice", "Bob", "John")

// interpret the insert-only DataStream as a Table
val inputTable = stenv.fromDataStream(dataStream)

z.show(inputTable, streamType="update")

For more PyFlink specific examples, see Query your data streams interactively using Kinesis Data Analytics Studio and Python.

profile pictureAWS
Jeremy
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南