I'm afraid limit() is not yet available on the Table API but you can use it via SQL, i.e. sth like "select * FROM (VALUES 'Hello', 'CIAO', 'foo', 'bar') LIMIT 2;" works. You can execute that from the Table API via `TableEnvironment.executeSql()`.

Best,
Aljoscha

On 09.07.20 17:53, Georg Heiler wrote:
How can I explore a stream in Flink interactively?

Spark has the concept of take/head to extract the first n elements of a
dataframe / table.

Is something similar available in Flink for a stream like:

val serializer = new JSONKeyValueDeserializationSchema(false)
val stream = senv.addSource(
     new FlinkKafkaConsumer(
       "tweets-raw-json",
       serializer,
       properties
     ).setStartFromEarliest() // TODO experiment with different start values
   )

stream.head/take

does not seem to be implemented.


Reply via email to