Display data is useful for pipeline runner UIs and diagnostic dashboards to display details about PTransforms that make up a pipeline.

Display data is optional and used for informational purposes.

Components specify display data by implementing the HasDisplayData interface.

UIs can collect DisplayData from a component using DisplayData.from utility.

from Utility

static DisplayData from(
  HasDisplayData component)

from is used when the JsonSerializer (of PipelineOptions as ProxyInvocationHandler.Serializer) is requested to serialize PipelineOptions.

import org.apache.beam.sdk.transforms.Create
val component = Create.of(0, 1, 2, 3, 4, 5)

import org.apache.beam.sdk.transforms.display.DisplayData
val displayData = DisplayData.from(component)

This JsonSerializer is only used to serialize a PipelineOptions (marked with @JsonSerialize(using = Serializer.class) annotation).