如何在Beam中渲染管道图? [英] How to render a pipeline graph in Beam?

查看:44
本文介绍了如何在Beam中渲染管道图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Apache Beam Python SDK 2.9.0版,是否有可能获得类似于Google数据流的可渲染管道图表示形式,而不是运行它?

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?

我很难组装复杂的管道,在尝试使用 DirectRunner 执行它之前,我很乐意看到一个组装好的管道.

I have difficulties to assemble complex pipelines and I would be happy to see an assembled pipeline before trying to execute it using DirectRunner.

推荐答案

看看这个 TextRenderer 只是以文本格式返回点表示形式.

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.

还提供了有关如何执行操作以及如何处理DOT文件的说明,但这是针对Java SDK编写的(链接).但是,它应该使您了解如何实现此方法,并且有关DOT文件的部分与语言无关.

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.

您可能还想看看 PyDot 包,以了解如何处理输出用Python编程.

You might also want to have a look at PyDot package to see how to handle the output programmatically in Python.

这篇关于如何在Beam中渲染管道图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆