[ 
https://issues.apache.org/jira/browse/BEAM-8016?focusedWorklogId=346940&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-346940
 ]

ASF GitHub Bot logged work on BEAM-8016:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Nov/19 18:58
            Start Date: 20/Nov/19 18:58
    Worklog Time Spent: 10m 
      Work Description: KevinGG commented on pull request #10132: [BEAM-8016] 
Pipeline Graph
URL: https://github.com/apache/beam/pull/10132#discussion_r348687379
 
 

 ##########
 File path: 
sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py
 ##########
 @@ -107,6 +135,17 @@ def _top_level_transforms(self):
         top_level_transform_proto = transforms[top_level_transform_id]
         yield top_level_transform_id, top_level_transform_proto
 
+  def _decorate(self, value):
+    """Decorates label-ish values used for rendering in dot language.
+
+    Escapes special characters in the given str value for dot language. Please
+    escape all PTransform unique names when building dot representation.
+    Otherwise, special characters will break the graph rendered.
 
 Review comment:
   Yes, I think the `escape` has a different meaning in DOT's doc. When we say 
escape (or 
    URL encoding), we mean it automatically adds things like `\` before special 
characters or convert ` ` into `%20`. 
   
   >In computing and telecommunication, an escape character is a character 
which invokes an alternative interpretation on subsequent characters in a 
character sequence. An escape character is a particular case of metacharacters. 
Generally, the judgment of whether something is an escape character or not 
depends on context.
   
   But in DOT, it kind of means the opposite.
   
   Because characters like `:` or `[]` have their own meanings in DOT, the 
recommended way is to enclose them with `"` so that they will be recognized as 
string literals.
   That's why originally the comment says `"` is the only character that cannot 
be escaped because `"` is the character that escapes everything in-between.
   Now, we do a replacement to convert `"` into `\\"` so that it becomes `\"` 
in dot and rendered as `"`.
   However, `\` is still not escaped because it's used as an escape character 
even in-between `"`. This never ends as long as python literals and DOT work 
like this.
   
    
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 346940)
    Time Spent: 5h 40m  (was: 5.5h)

> Render Beam Pipeline as DOT with Interactive Beam  
> ---------------------------------------------------
>
>                 Key: BEAM-8016
>                 URL: https://issues.apache.org/jira/browse/BEAM-8016
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-py-interactive
>            Reporter: Ning Kang
>            Assignee: Ning Kang
>            Priority: Major
>          Time Spent: 5h 40m
>  Remaining Estimate: 0h
>
> With work in https://issues.apache.org/jira/browse/BEAM-7760, Beam pipeline 
> converted to DOT then rendered should mark user defined variables on edges.
> With work in https://issues.apache.org/jira/browse/BEAM-7926, it might be 
> redundant or confusing to render arbitrary random sample PCollection data on 
> edges.
> We'll also make sure edges in the graph corresponds to output -> input 
> relationship in the user defined pipeline. Each edge is one output. If 
> multiple down stream inputs take the same output, it should be rendered as 
> one edge diverging into two instead of two edges.
> For advanced interactivity highlight where each execution highlights the part 
> of the pipeline really executed from the original pipeline, we'll also 
> provide the support in beta.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to