Search code examples
jupyter-notebookapache-flinkflink-sqlpyflink

Pyflink view data inside Jupyter notebook like Head/Show in pandas/pyspark


I'm new with PyFlink and trying to learn. I was using pyflink with jupyter Notebook and performing some basic operations. So when I perform certain operation it return a table location in memory like "<pyflink.table.table.Table at 0x1eeffd773a0>. To view data I need to call to_pandas() method. Is it possible to view data without calling to_pandas(). is there any method available in Pyflink to view processed data. like head in pandas or show/display in pyspark.

Thanks Snippet


Solution

  • You can refer to pyflink table api https://nightlies.apache.org/flink/flink-docs-master/docs/dev/python/table/intro_to_table_api/

    May be you can use execute or execute_sql to get TableResult, and use collect or print api in TableResult