[
https://issues.apache.org/jira/browse/BEAM-366?focusedWorklogId=579830&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-579830
]
ASF GitHub Bot logged work on BEAM-366:
---------------------------------------
Author: ASF GitHub Bot
Created on: 09/Apr/21 07:37
Start Date: 09/Apr/21 07:37
Worklog Time Spent: 10m
Work Description: angoenka commented on a change in pull request #14470:
URL: https://github.com/apache/beam/pull/14470#discussion_r609984292
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -1248,7 +1249,18 @@ def transform_to_runner_api(
environment_id=environment_id,
annotations=self.annotations,
# TODO(BEAM-366): Add display_data.
- display_data=None)
+ display_data=[
+ beam_runner_api_pb2.DisplayData(
+
urn=common_urns.StandardDisplayData.DisplayData.LABELLED_STRING.
Review comment:
There is only 1 enum defined for DisplayData types which is
beam:display_data:labelled_string:v1
I think the proto has it mostly for future extensibility.
Alternatively, we can have a DisplayData type which closely resemble v1beta3
display data so that we don't loose information like
{
"key": "fn",
"label": "Transform Function",
"namespace": "apache_beam.transforms.core.ParDo",
"shortValue": "_WriteBundleDoFn",
"type": "STRING",
"value": "apache_beam.io.iobase._WriteBundleDoFn"
},
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -1248,7 +1249,18 @@ def transform_to_runner_api(
environment_id=environment_id,
annotations=self.annotations,
# TODO(BEAM-366): Add display_data.
- display_data=None)
+ display_data=[
+ beam_runner_api_pb2.DisplayData(
+
urn=common_urns.StandardDisplayData.DisplayData.LABELLED_STRING.
+ urn,
+ payload=beam_runner_api_pb2.LabelledStringPayload(
+ label=dd.get_dict()['label']
+ if 'label' in dd.get_dict() else None,
+ value=str(
+ dd.get_dict()['value'] if 'value' in
+ dd.get_dict() else None)).SerializeToString())
+ for dd in DisplayData.create_from(self.transform).items if dd.label
Review comment:
Done
--
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 579830)
Time Spent: 40m (was: 0.5h)
> Support Display Data on Composite Transforms
> --------------------------------------------
>
> Key: BEAM-366
> URL: https://issues.apache.org/jira/browse/BEAM-366
> Project: Beam
> Issue Type: Improvement
> Components: runner-dataflow
> Reporter: Ben Chambers
> Priority: P3
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Today, the Dataflow runner doesn't represent composites all the way to the UI
> (it reconstructs them from the name). This means it doesn't support attaching
> Display Data to composites.
> With the runner API refactoring, Dataflow runner should start supporting
> composites, at which point we should make sure that Display Data is plumbed
> through properly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)