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
gefragt vor 2 Jahren434 Aufrufe
1 Antwort
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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen