Join the SIG TFX-Addons community and help make TFX even better!


A component that binds a DataView to ExamplesArtifact.

Inherits From: BaseComponent, BaseNode

It takes as inputs a channel of Examples and a channel of DataView, and binds the DataView (i.e. attaching information from the DataView as custom properties) to the Examples in the input channel, producing new Examples Artifacts that are identical to the input Examples (including the uris), except for the additional information attached.


  # We assume Examples are imported by ExampleGen
  example_gen = ...
  # First, create a dataview:
  data_view_provider = TfGraphDataViewProvider(
  # Then, bind the DataView to Examples:
  data_view_binder = DataViewBinder(
  # Downstream component can then consume the output of the DataViewBinder:
  stats_gen = StatisticsGen(
      examples=data_view_binder.outputs['output_examples'], ...)

spec types.ComponentSpec object for this component instance.
custom_executor_spec Optional custom executor spec overriding the default executor specified in the component attribute.

outputs Component's output channel dict.