问题
Using Apache Beam Python SDK version 2.9.0, is it possible to get a renderable pipeline graph representation similar to Google’s dataflow instead of running it?
I have difficulties to assemble complex pipelines and I would be happy to see an assembled pipeline before trying to execute it using DirectRunner
.
回答1:
Have a look at this unit test. This should give you an example of how this works with Python SDK. TextRenderer simply returns the dot representation in text format.
There is also an explanation for how to do it and how to handle DOT files, but it is written for Java SDK (link). However, it should give you an idea how this can implemented, and the part about DOT files there is language agnostic.
You might also want to have a look at PyDot package to see how to handle the output programmatically in Python.
来源:https://stackoverflow.com/questions/54094081/how-to-render-a-pipeline-graph-in-beam