You can also use interactive Beam's collect, to get the PCollection as a Dataframe, and then print it or do whatever else with it as you like.
On Fri, Apr 30, 2021 at 10:24 AM Ning Kang <ni...@google.com> wrote: > > Hi Tao, > > The `show()` API works with any IPython notebook runtimes, including Colab, > Jupyter Lab and pre-lab Jupyter Notebooks, as long as you have `%pip install > apache-beam[interactive]`. > > Additionally, the `show_graph()` API needs GraphViz binary installed, details > can be found in the README. > > If you've created an Apache Beam notebook instance on Google Cloud, there is > an example notebook "Examples/Visualize_Data.ipynb" demonstrating how to > visualize data of PCollections with different libraries: > > Native Interactive Beam Visualization > Pandas DataFrame > Matplotlib > Seaborn > Bokeh > D3.js > > Hope this helps! > > Ning > > On Fri, Apr 30, 2021 at 9:24 AM Brian Hulette <bhule...@google.com> wrote: >> >> +Ning Kang +Sam Rohde >> >> On Thu, Apr 29, 2021 at 6:13 PM Tao Li <t...@zillow.com> wrote: >>> >>> Hi Beam community, >>> >>> >>> >>> The notebook console from Google Cloud defines a show() API to display a >>> PCollection which is very neat: >>> https://cloud.google.com/dataflow/docs/guides/interactive-pipeline-development >>> >>> >>> >>> If we are using a regular jupyter notebook to run beam app, how can we >>> print out a PCollection easily? What’s the best practice? Thanks! >>> >>>