public abstract class RecommendationAIWriteUserEvent extends PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>
PTransform using the Recommendations AI API (https://cloud.google.com/recommendations).
Takes an input PCollection of GenericJsons and converts them to and creates
UserEvents.
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").
| Modifier and Type | Field and Description |
|---|---|
static TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> |
FAILURE_TAG |
static TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> |
SUCCESS_TAG |
annotations, displayData, name, resourceHints| Constructor and Description |
|---|
RecommendationAIWriteUserEvent() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
catalogName() |
abstract java.lang.String |
eventStore() |
PCollectionTuple |
expand(PCollection<com.google.api.client.json.GenericJson> input)
The transform converts the contents of input PCollection into
UserEvents and then calls
the Recommendation AI service to create the user event. |
abstract java.lang.String |
projectId() |
RecommendationAIWriteUserEvent |
withCatalogName(java.lang.String catalogName) |
RecommendationAIWriteUserEvent |
withEventStore(java.lang.String eventStore) |
RecommendationAIWriteUserEvent |
withProjectId(java.lang.String projectId) |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validatepublic static final TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> SUCCESS_TAG
public static final TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> FAILURE_TAG
@Nullable public abstract java.lang.String projectId()
@Nullable public abstract java.lang.String catalogName()
@Nullable public abstract java.lang.String eventStore()
public PCollectionTuple expand(PCollection<com.google.api.client.json.GenericJson> input)
UserEvents and then calls
the Recommendation AI service to create the user event.expand in class PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>input - input PCollectionUserEventspublic RecommendationAIWriteUserEvent withProjectId(java.lang.String projectId)
public RecommendationAIWriteUserEvent withCatalogName(java.lang.String catalogName)
public RecommendationAIWriteUserEvent withEventStore(java.lang.String eventStore)