File tree Expand file tree Collapse file tree
sdks/python/apache_beam/ml/gcp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,9 +79,11 @@ def get_recommendation_user_event_client():
7979
8080
8181class CreateCatalogItem (PTransform ):
82- """Creates catalogitem information.
83- The ``PTransform`` returns a PCollectionTuple with a PCollections of
84- successfully and failed created CatalogItems.
82+ """Creates catalog item records.
83+
84+ The ``PTransform`` returns a ``PCollectionTuple`` of successfully created
85+ catalog items (``created_catalog_items``) and failures
86+ (``failed_catalog_items``).
8587
8688 Example usage::
8789
@@ -125,14 +127,15 @@ def expand(self, pcoll):
125127 raise ValueError (
126128 """GCP project name needs to be specified in "project" pipeline
127129 option""" )
128- return pcoll | ParDo (
130+ pardo = ParDo (
129131 _CreateCatalogItemFn (
130132 self .project ,
131133 self .retry ,
132134 self .timeout ,
133135 self .metadata ,
134- self .catalog_name )).with_outputs (
135- FAILED_CATALOG_ITEMS , main = 'created_catalog_items' )
136+ self .catalog_name ))
137+ return pardo .with_outputs (
138+ FAILED_CATALOG_ITEMS , main = 'created_catalog_items' )
136139
137140
138141class _CreateCatalogItemFn (DoFn ):
You can’t perform that action at this time.
0 commit comments