Class RecommendationAIPredict
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>
 
org.apache.beam.sdk.extensions.ml.RecommendationAIPredict
- All Implemented Interfaces:
 Serializable,HasDisplayData
public abstract class RecommendationAIPredict
extends PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple> 
A 
PTransform using the Recommendations AI API (https://cloud.google.com/recommendations).
 Takes an input PCollection of GenericJsons and creates PredictResponse.PredictionResults.
 It is possible to provide a catalog name to which you want to add the user event (defaults to "default_catalog"). It is possible to provide a event store to which you want to add the user event (defaults to "default_event_store"). A placement id for the recommendation engine placement to be used.
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> static final TupleTag<com.google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult> Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionabstract Stringabstract Stringexpand(PCollection<com.google.api.client.json.GenericJson> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.abstract Stringabstract StringwithCatalogName(String catalogName) withEventStore(String eventStore) withPlacementId(String placementId) withProjectId(String projectId) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate 
- 
Field Details
- 
SUCCESS_TAG
public static final TupleTag<com.google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult> SUCCESS_TAG - 
FAILURE_TAG
 
 - 
 - 
Constructor Details
- 
RecommendationAIPredict
public RecommendationAIPredict() 
 - 
 - 
Method Details
- 
projectId
- Returns:
 - ID of Google Cloud project to be used for creating catalog items.
 
 - 
catalogName
- Returns:
 - Name of the catalog where the catalog items will be created.
 
 - 
eventStore
- Returns:
 - Name of the event store where the user events will be created.
 
 - 
placementId
- Returns:
 - ID of the recommendation engine placement.
 
 - 
withProjectId
 - 
withCatalogName
 - 
withEventStore
 - 
withPlacementId
 - 
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
 expandin classPTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple> 
 
 -